knaxuslearn · build · ship

Roadmaps / Rust / Phase 4

Phase 4 of 4 · Study weeks 13-16

Supply chain, interop and the decision to adopt

This phase makes the last checkpoint possible: a project you can ship, call from another language and defend to a team.

Topics every week

  1. Week 138 h
    • Cargo workspaces and features
    • rust-toolchain.toml and MSRV
    • Semver and API guidelines
    • Editions

    Hand inA workspace with a pinned toolchain and a stated MSRV

  2. Week 148 h
    • cargo-deny and advisories
    • Auditing dependencies
    • A dependency budget
    • build.rs and proc macros as risk

    Hand inA policy file where a seeded bad dependency fails CI

  3. Week 158 h
    • A C ABI with cbindgen
    • Python bindings with PyO3
    • Calling C++ with cxx
    • Ownership across a boundary

    Hand inA Python or C client that reads and writes the store

  4. Week 168 h
    • Release builds and SBOMs
    • Upgrade policy for a six-week release cycle
    • Where Rust helps and where it does not
    • Review

    Hand inCheckpoint 4, the adoption memo and the upgrade policy

Practice projects

  • Practice 1, the dependency policy (Week 14): write a deny.toml for licences and advisories. Done when: a seeded vulnerable crate and a seeded unlicensed crate each fail CI, and removing them passes.
  • Practice 2, the boundary (Week 15): expose get and put to Python. Done when: a Python test passes, memory is freed on both sides and the ownership rule for each pointer or buffer is written down.
  • Practice 3, the upgrade rehearsal (Week 16): build with the previous and the current stable compiler. Done when: a table compares tests, build time and binary size, and says whether to move.
  • Optional, a C++ caller: call the store from C++ with cxx. Done when: a test passes and the build runs in CI.

GitHub repos to study

Existence and last commit were checked on 22 Nov 2026 by shallow clone. Every repository below had a commit in the last 12 months.

RepoWhat to readWeek
EmbarkStudios/cargo-denyThe check types and the config file14
rustsec/rustsecThe advisory database and its format14
PyO3/pyo3How ownership and the interpreter lock are handled15
mozilla/cbindgenHow a C header is generated from Rust types15
dtolnay/cxxA checked boundary between Rust and C++15

Milestone checkpoint

Run Checkpoint 4. Build from a pinned toolchain, add the dependency policy and the seeded bad crates, write the Python or C client and produce the SBOM. Write the adoption memo with the numbers from the checkpoints: what Rust prevented, what it cost in hours and where it did not help. Hand in the CI output (a failing and a passing run), the client test, ADR-7 (the unsafe and dependency policy) and the memo.

Check yourself

Answer each question in your head first, then open it to check.

  1. What does an advisory database tell you that a lockfile does not?
    Which versions of which crates have known vulnerabilities, so you can match your lockfile against them.
  2. Why are build.rs files and procedural macros a supply-chain risk?
    They run arbitrary code at build time, with your permissions, before any of your tests run.
  3. What goes wrong when a pointer crosses a C boundary?
    Nobody knows who frees it, how long it lives and what the layout is. Write the rule for each pointer and test both sides.
  4. Why does Rust have no long-term support release, and what do you do about it?
    Releases arrive every six weeks and old ones get no fixes. Upgrade on a schedule, pin the toolchain and keep a stated minimum supported version for libraries.
  5. When would you tell a team not to adopt Rust?
    When the team has no one to review the code, when the component is small and rarely changes, or when a library you need exists only in another language. Put numbers on the cost first.