Build and consumer integration
Sharp Runtime’s CMake graph can build the complete compatibility surface or a dependency-closed subset.
Configuration options
| Option | Default | Purpose |
|---|---|---|
SHARP_RUNTIME_COMPONENTS | All for standalone builds | Semicolon-separated component names |
SHARP_RUNTIME_BUILD_TESTS | ON | Build requested component tests |
SHARP_RUNTIME_BUILD_BENCHMARKS | OFF | Build the standalone micro-benchmark |
Complete build
git submodule update --init --recursive
cmake -S . -B build \
-DSHARP_RUNTIME_COMPONENTS=All
cmake --build build --target SharpRuntimeTests --parallel 2
Selective build
cmake -S . -B build-json \
-DSHARP_RUNTIME_BUILD_TESTS=OFF \
'-DSHARP_RUNTIME_COMPONENTS=Text.Json;Net.Http.Json'
cmake --build build-json --parallel 2
Target rules
- Use
SharpRuntime::<Component>targets for new code. SharpRuntime::Allaggregates every physical component.SharpRuntime::CoreandSharpRuntime::Collectionspreserve older broad surfaces.SharpRuntime::Xml.XPathaliases the physicalXmlarchive.- The raw legacy
SHARP_RUNTIMEtarget exists only whenAllis enabled.
External dependencies
| Selection | Dependency | Visibility |
|---|---|---|
IO.Compression | ZLIB | Private; found by CMake |
IO.Compression.Zip | Vendored miniz | Private |
Xml | Vendored tinyxml2 | Public because public headers expose its types |
Text.Json / HTTP JSON | Vendored nlohmann JSON headers | Header surface |
Storage on Android | Parent-provided SDL3 target | Private |
| Tests | Vendored GoogleTest submodule | Test-only |
Compiler capability
At this source pin there is no CMake capability probe or fallback for native __int128. Affected Decimal and wide-integer surfaces therefore constrain toolchains such as current MSVC. The develop-only i686 guard is not part of this selected remediation branch.