Build and consumer integration

Sharp Runtime’s CMake graph can build the complete compatibility surface or a dependency-closed subset.

ReferenceCMake 3.20+C++23

Configuration options

OptionDefaultPurpose
SHARP_RUNTIME_COMPONENTSAll for standalone buildsSemicolon-separated component names
SHARP_RUNTIME_BUILD_TESTSONBuild requested component tests
SHARP_RUNTIME_BUILD_BENCHMARKSOFFBuild 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::All aggregates every physical component.
  • SharpRuntime::Core and SharpRuntime::Collections preserve older broad surfaces.
  • SharpRuntime::Xml.XPath aliases the physical Xml archive.
  • The raw legacy SHARP_RUNTIME target exists only when All is enabled.

External dependencies

SelectionDependencyVisibility
IO.CompressionZLIBPrivate; found by CMake
IO.Compression.ZipVendored minizPrivate
XmlVendored tinyxml2Public because public headers expose its types
Text.Json / HTTP JSONVendored nlohmann JSON headersHeader surface
Storage on AndroidParent-provided SDL3 targetPrivate
TestsVendored GoogleTest submoduleTest-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.