# Compilers, runtimes and deployment

Compile a distinct native library for each target. The C ABI crosses compiler
boundaries; operating-system libraries and runtime requirements still apply.
The SDK does not bundle a compiler or an EpicTuner application.

## Target matrix

| Target | Author toolchain | Evidence boundary |
|---|---|---|
| Windows x64 | MinGW GCC 13.1; x64 MSVC 19.51 | Native worker and application examples; SDK-only consumer builds against the MinGW host |
| Linux x64 | GCC 15.2 under WSL; C11/C++20 ABI | Native Linux worker/conformance; independent X11/OpenGL window under WSLg |
| Linux ARM64 | AArch64 GCC with matching sysroot | Cross-build and QEMU ABI conformance; physical Pi worker/GUI certification pending |
| macOS / Windows ARM64 / Linux armhf | Not released targets | No compatible-binary claim |

This records the environments used by the SDK milestone sequence. The M07
release audit records fresh build/test results. No physical ECU, engine, mixed-DPI
hot-plug or Raspberry Pi runtime acceptance is implied by an emulator test.

## Build requirements

Use CMake 3.24+, C11 for C authors and C++20 for wrapper consumers. Ordinary ET
panels link only the header-only SDK target and the compiler's native runtime.
The ImGui example additionally compiles its vendored ImGui/GLFW sources and links
OpenGL. Linux uses GLFW's X11 backend and requires X11, Xrandr, Xinerama, Xcursor,
Xi and OpenGL development headers. Wayland-native rendering is not certified.

Use separate output directories for compilers, build configurations and targets.
A 64-bit OS does not guarantee that the selected compiler produces 64-bit code.
Check architecture explicitly when a package reports an incompatible native file.

## Windows runtime deployment

Use the supplied host runtime bundle. It stages Qt, the MinGW runtime and the
host's OpenSSL library beside the executables. Plugin authors do not link Qt.
MinGW plugins may require `libstdc++-6.dll`, `libgcc_s_seh-1.dll` and
`libwinpthread-1.dll`; the tested host bundle already carries its matching versions.
Declare additional plugin dependencies in the signed package.

MSVC plugins need a compatible Visual C++ runtime when built with dynamic CRT.
Do not assume a compiler installation exists on the destination computer.
Verify with Qt/compiler directories removed from PATH. Export only
`et_plugin_query` and avoid passing STL objects or allocations across the ABI.

## Linux runtime floors

Build against the oldest distribution you intend to support and inspect the
resulting ELF `NEEDED` libraries and `GLIBC_*` / `GLIBCXX_*` symbol versions.
The required floor is the maximum version imported by the actual release
payload, not the compiler's marketing version. Record those imports in the
release evidence. A WSL run proves that environment; it does not certify every
Linux distribution.

The M7 GCC 15.2 x64 example build imports up to `GLIBC_2.38` for the standard
panels and `GLIBCXX_3.4.31`. Its ImGui binary imports `GLIBC_2.43` as well as
`libOpenGL.so.0`; it is a test binary for that build environment. Rebuild against
your deployment sysroot before targeting older distributions. The SDK source
does not itself impose those binary runtime floors.

The standalone worker implementation can build with Qt Core/Network/Test 6.4+.
The full application currently builds with Qt 6.11. The worker's Qt dependency
does not become an SDK author dependency. OpenGL 3.3 and an available X11 display
are required for the supplied ImGui renderer.

## Reproducible consumer verification

```sh
cmake -S /absolute/sdk/tests -B consumer -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/absolute/sdk
cmake --build consumer
ctest --test-dir consumer --output-on-failure
cmake -S /absolute/sdk/tests/c-only -B c-only -DCMAKE_PREFIX_PATH=/absolute/sdk
cmake --build c-only
ctest --test-dir c-only --output-on-failure
```

For ARM64, configure a matching AArch64 toolchain and sysroot and supply
`CMAKE_CROSSCOMPILING_EMULATOR` for QEMU. Run the actual worker on a physical
target before claiming device support. See [verification](VERIFICATION.md).
