Governance Best Practices
A condensed summary of the 25 most important governance practices for Rust fleets - drawn from every page in this section.
-
Pin toolchain in
rust-toolchain.toml: Fleet on Rust 1.97.0, edition 2024 - Edition & Toolchain Upgrades. -
rustfmt + clippy
-D warningson main: Style not debated in review - Coding Standards & API Guidelines. -
Rust API guidelines for public crates: Naming, errors, docs with examples.
-
Domain crates forbid framework imports: axum/sqlx stay in infra/binary layers.
-
thiserrorlibs,anyhowbinaries: Clear error boundaries. -
Deny
unwrapon request path: Clippy or crate policy. -
Two reviewers for
unsafe: SAFETY comments mandatory - Unsafe & Dependency Governance. -
Miri on FFI crates nightly: Catch UB before prod.
-
cargo audit on every main build: CVE SLA documented.
-
cargo deny license/bans: No surprise GPL conflicts.
-
cargo vet for production deps: Evidence trail for new crates.
-
SBOM on releases: CycloneDX with image/CLI - Contribution Guidelines.
-
ADRs in
docs/adr/: Supersede, never delete - Documentation Conventions. -
Runbooks in repo with
last_verified: Quarterly drill updates. -
README: owner, on-call, deploy order: Onboarding in minutes.
-
PR template: intent, risk, rollback: Same fleet template.
-
CODEOWNERS on migrations and unsafe: Right reviewers automatically.
-
Spikes 2-3 days with criteria: Before adopting new crates - Spikes, PoCs & Adopting New Crates.
-
PoC != production: Hardening checklist before merge.
-
MSRV bump is comms event: CHANGELOG + consumer notice.
-
Edition migration dedicated train: No mixed drive-by edition fixes.
-
SME site updated with fleet standards: Linked from CONTRIBUTING.
-
Lessons-learned catalog maintained: Post-mortem feeds LL entries.
-
Career rubric uses impact evidence: Not trivia - Career Growth.
-
Governance retro yearly: Prune rules that no longer pay rent.
FAQs
How strict for small startup?
Adopt 1-10 first; add vet/SBOM as customers require.
Exceptions process?
ADR with expiry date; not silent allow.
Who owns governance?
Platform/guild stewards; squads follow, propose changes via PR.
Open source vs internal?
Stricter license and API semver on published crates.
Enforcement without trust loss?
Automate objective rules; discuss subjective design in review.
Polars/ML governance?
Same audit path; add data handling review for PII transforms.
Wasm governance?
Size CI gates + host contract versioning in ADR.
Audit failing dep?
Patch, replace crate, or documented risk acceptance with expiry.
Onboarding governance?
Week 1: standards doc + top 10 lessons-learned + clippy baseline PR.
Measure governance ROI?
CFR, CVE MTTR, onboarding time, repeat incident rate.
Related
- Coding Standards & API Guidelines - conventions
- Unsafe & Dependency Governance - security
- Edition & Toolchain Upgrades - toolchain
- Leadership Best Practices - people
- Delivery Best Practices - shipping
Stack versions: This page was written for Rust 1.97.0 (edition 2024), Tokio 1.x, Axum 0.8, serde 1.0, sqlx 0.8, clap 4, and Polars 0.46+.