Accepted adr-004 · 2026-10-03

Every Declared Target Builds with Cargo Alone: No Dependency Compiles C

Context

openbyname ships for every target of code/config/targets.ncl — macOS, Linux and Windows on x86_64 and aarch64 — and sow-openbyname-v2's O10 required each to `cargo check` with every feature. Measured on 2026-10-03 from macOS: rusqlite 0.40 with `bundled` (the ticket store's SQLite feature) and ring 0.17 (the default TLS provider of rustls) both fail for x86_64/aarch64-unknown-linux-gnu and x86_64-pc-windows-msvc, because their build scripts compile C with a cross compiler that is not there (x86_64-linux-gnu-gcc not found; stdlib.h missing for msvc). O10 stayed red under v2 for that reason alone.

Decision

No crate in the dependency graph of the workspace — normal or build dependencies, with every feature, for every target — compiles C or C++ or links a system library through pkg-config: the build tools cc, cmake, pkg-config and bindgen, and crates known to need them (libsqlite3-sys, openssl-sys, aws-lc-sys, ring), stay out of it. Consequences already taken: the ticket store is redb, pure Rust, and SQLite is parked (bl-002); HTTPS is rustls with webpki roots and a pure-Rust provider chosen by the CPU once per process: graviola where every feature it asserts is present, rustls-rustcrypto elsewhere — no CPU of a declared architecture is left without https. A dependency that would break this needs a successor of this ADR, not a feature flag.

Constraints

Alternatives considered