2.4 KiB
2.4 KiB
ADR 0003: Vendoring policy — pristine upstream archives + patch queue
Status: ACCEPTED Date: 2026-09-15
Context
The operator directed that ASIC-rs and wxWidgets live vendored in this repo "so that we can handle merging updates easily". Upstream is not reachable through our suspended GitHub account, and we want reproducible offline builds and conflict-free updates.
Decision
Both dependencies are vendored under vendor/ as pristine upstream
archives plus a patch queue:
vendor/ cargo-managed crate sources ONLY (regenerated by
`cargo vendor vendor`; it deletes unmanaged dirs - never
put hand-made trees here; learned the hard way)
thirdparty/
asic-rs lives in vendor/ (pure crates.io dep, cargo-vendored)
wxwidgets/
wxWidgets-3.3.3/ pristine release tree, never edited directly
VERSION upstream version + tarball URL + sha256
patches/ our changes as numbered .patch files (empty today)
wx-rs/
wx-rs-0.2.0-patched/ the used crate (path dep from alkane-gui)
VERSION upstream version + tarball URL + sha256
patches/ 0001 linux build path, 0002 rust widgets binding,
0003 C++ widget bridge, 0004 upstream wx3.3 fixes
Rules:
- Never edit a vendored pristine tree in place — every local change is a
patch in
patches/, applied by the build in numeric order. This makes an upstream update: replace pristine archive,git applysurviving patches, rebase the rest. - Every vendored tree records its upstream source URL and sha256 in
VERSION. Updates are a diff of one version-pinning line plus the patch-queue rebase. - Builds happen out-of-tree (
~/.cache/wxbuild,~/.cache/wx-3.3.3-linux) because the synced project mount is noexec; scripts/build-wx-linux.sh automates it. - asic-rs is pinned per semver in Cargo.toml and materialized with
cargo vendor; the build uses.cargo/config.toml's vendored-sources replacement, so builds never touch the network. - wxWidgets 3.3.3 release tarball is the merge unit (wx upstream supports
it); the C++ shell links the vendored tree via CMake
add_subdirectory.
Consequences
- The repo grows by the vendored sources (one-time; git-compressed).
- Offline/reproducible builds on any machine, including the bench Pi.
- Updating either dependency is mechanical, reviewable, and never entangles our changes with upstream files.