# Building and checking the SDK contract

Extract the SDK archive into a fresh directory. Neither the application source nor
Qt is required. Use CMake 3.24+, a 64-bit C11/C++20 compiler and its normal native
runtime. Compile separately for Windows x64, Linux x64 and Linux ARM64. macOS is a
future target. The SDK contains no bundled compiler, Qt, crypto library or binaries.

```sh
cmake -S /absolute/sdk/tests -B consumer-build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/absolute/sdk
cmake --build consumer-build --config Release
ctest --test-dir consumer-build -C Release --output-on-failure
cmake -S /absolute/sdk/tests/c-only -B c-only-build -DCMAKE_PREFIX_PATH=/absolute/sdk
cmake --build c-only-build --config Release
ctest --test-dir c-only-build -C Release --output-on-failure
```

On Windows, use forward-slash absolute paths and an x64 MSVC developer shell or
MinGW x64 toolchain. For Ninja, explicitly select `-DCMAKE_C_COMPILER=cl` and
`-DCMAKE_CXX_COMPILER=cl` for MSVC, or `gcc`/`g++` for MinGW. Keep each compiler's
build directory separate. Multi-configuration generators use `--config Release`.

The four conformance cases exercise C layout, C++ ownership/exception/value/version
contracts, and actual C/C++ shared-module query/start/event/stop calls. Binary
fixtures negotiate both ABI 1.0 and 1.1 and reject incompatible hosts. Assertions
remain active in Release. The fifth case configures with only a C compiler enabled,
checking that the C imported target never requires the C++ toolchain.

For ARM64 cross-compilation, set a CMake toolchain with an AArch64 compiler/sysroot
and `CMAKE_CROSSCOMPILING_EMULATOR` pointing to QEMU plus its `-L` runtime root. The
same shared-module tests then execute as ARM64 code. Emulation does not establish
physical Raspberry Pi, worker supervision, GUI, renderer or hardware acceptance.

The private repository additionally tests the worker/broker, schema/signature
vectors, stale handles, cancellation/commit rules and a five-worker transport
benchmark. Those host implementation tests and test signing keys are intentionally
excluded from this author export. Signed package verification and the v1 application
services are implemented. Production commercial operations remain tracked in DECISIONS.md.

The independent ImGui example needs native OpenGL
and GLFW platform development headers, which the core ABI suite does not. On
Windows and Linux, use the worker checker's `--custom-window` mode described in
the ImGui example README. The host repository also has native application/input
acceptance scripts; those are host-maintainer tests and are not SDK dependencies.

Install `tools/requirements.txt`, then run `python tests/test_tools.py` for
catalog authentication/inventory, starter generation and website link regressions.
Use `tools/build-docs.py --output site` to build and validate every website page.

`SHA256SUMS.txt` inventories every exported file other than itself. Verify those
hashes after extraction. This is a prepared SDK v1 release candidate. The product
owner requested preparation with redistribution terms pending; see REDISTRIBUTION.md.
