- Status: Accepted
- Date: 2026-06-27
- Deciders: project maintainer
The project bundles libzstd for six classifiers ({osx,linux,windows} ×
{x86_64,aarch64}). zstd is pure C with no build-system dependency. The build
must produce all six from CI without per-platform runners or system toolchains.
Compile the zstd library sources directly with zig cc
(scripts/build-zstd.sh). Zig bundles clang + libc + headers for every target,
so any host cross-compiles any classifier hermetically. No zstd Makefile, no
CMake, no sysroot. The Maven exec plugin runs it in generate-resources;
it is idempotent (skips if the library exists).
- One CI host (
ubuntu-latest) builds all six classifiers — including the ones with no free CI runner (windows-aarch64, linux-aarch64). - Hermetic and reproducible: no dependence on the host's installed toolchain.
- Compiles
.cdirectly, bypassing zstd's own build entirely.
- Adds a Zig toolchain dependency to the build.
zig ccis a clang wrapper, not the zstd-blessed build path.
- Zig is pre-1.0;
zig ccflag behavior can shift between versions. The Zig version is pinned (0.16.0) in CI; upgrades require a re-test.
- GitHub matrix runners: no free windows-aarch64 / fragmented, slow.
- CMake/Make + cross sysroots: per-target toolchain setup, the misery this decision exists to avoid.