50 lines
1.9 KiB
Markdown
50 lines
1.9 KiB
Markdown
# 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/
|
|
asic-rs/ cargo-vendored crate tree (every transitive crate source);
|
|
regenerated by `cargo vendor vendor` on version bump;
|
|
driven by the version pin in crates/*/Cargo.toml
|
|
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)
|
|
```
|
|
|
|
Rules:
|
|
|
|
1. 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 apply` surviving
|
|
patches, rebase the rest.
|
|
2. 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.
|
|
3. 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.
|
|
4. 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.
|
|
- Updating either dependency is mechanical, reviewable, and never
|
|
entangles our changes with upstream files.
|