Rust
These guides give instructions to configure a production Rust project. They show how to control changes and build releases. They show how to record what a release contains. They also give the procedure for security incidents.
Compare these procedures with the legal, contractual, and regulatory requirements for your organization. US federal buyers commonly use the NIST Secure Software Development Framework (SSDF) to examine supplier practices. The EU Cyber Resilience Act (CRA) specifies requirements for commercial products on the EU market. Use these guides as examples. Do a compliance assessment for the applicable requirements.
Contents
- Enterprise readiness guide — Project controls, owners, and records for adopters
- Secure development lifecycle — Threat models, secure defaults, Rust safety checks, and SSDF
- Project configuration — Cargo metadata, Rust edition, toolchain, and lints
- Code quality checks — Format, lint, documentation, and API compatibility checks
- Testing strategy — Test types, test tools, and tests for
unsafecode - Supply chain security — Dependency checks with
cargo-deny,cargo-vet, andcargo-audit - Security scanning — Scans for secrets, vulnerabilities, workflow errors, and
unsafecode - Minimum supported Rust version — Version policy, Cargo Resolver v3, and CI checks
- CI/CD pipeline — GitHub Actions jobs, test platforms, and action versions
- Release automation — Release pull requests, Trusted Publishing, and release verification
- Dependency management — Dependabot, minimum publication age, and the lockfile
- Local development — Tool installation,
justfile, and contributor instructions - Security policy — Private vulnerability reports, response times, and RustSec advisories
- Project governance — Roles, licenses, repository rules, and the code of conduct
Application guides
- CLI and TUI applications — Argument parsing, terminal recovery, output streams, and binary distribution
- Desktop GUI applications — Framework selection, thread safety, security capabilities, accessibility, and code signing
- Web UI (WebAssembly) applications — WASM frameworks, bundle optimization, Content Security Policy, and browser tests
- Web API services — HTTP frameworks, middleware limits, RFC 9457 errors, SQLx offline builds, and containers
- Embedded applications —
no_stdHALs, ESP32 and AVR targets, Embassy and RTIC, memory safety, and firmware testing
Agent skills
You can install these guides as skills.sh agent skills:
# Install all skills interactivelynpx skills add kerryhatcher/rusty-dev
# Or install specific skillsnpx skills add kerryhatcher/rusty-dev --skill rust-dev --skill rust-embedded| Skill | Scope |
|---|---|
rust-dev |
General production Rust setup, lints, MSRV, testing, supply-chain security, CI/CD, and releases |
rust-cli-tui |
CLI and TUI applications (clap, ratatui, crossterm, cargo-dist) |
rust-desktop-gui |
Desktop GUI applications (Tauri v2, Iced, egui, Slint, GPUI, AccessKit, code signing) |
rust-web-ui-wasm |
Web UI / WebAssembly applications (Leptos, Dioxus, Yew, wasm-bindgen, CSP) |
rust-web-api |
Web API services (axum, tower-http, sqlx, RFC 9457, cargo-chef containers) |
rust-embedded |
Embedded firmware (embedded-hal, esp-hal, avr-hal, Embassy, RTIC, probe-rs, defmt) |
Minimum release requirements
Before you give a release to an organization, make sure that the project has these controls.
- Publish a policy that identifies the supported versions.
- Give a private channel for vulnerability reports.
- Enable branch protection for the default branch.
- Review the inputs that continuous integration (CI) uses.
- Pin GitHub Actions to full commit SHAs.
- Commit the lockfile.
- Set rules for dependencies, licenses, advisories, and minimum publication age.
- If you publish to crates.io, use OIDC Trusted Publishing.
Give these files and instructions with the release.
- Publish a software bill of materials (SBOM) with the minimum elements that CISA specifies for 2026.
- Publish build provenance attestations.
- Publish checksums.
- Give adopters the commands to check the release files.
For a list of the records for each control, refer to the enterprise readiness guide.
Source documents
- NIST SP 800-218: Secure Software Development Framework (SSDF)
- ANSSI Secure Rust Guidelines
- OpenSSF Best Practices Badge, OpenSSF Scorecard, and OpenSSF OSPS Baseline
- SLSA v1.2 specification
- CISA 2026 Minimum Elements for a Software Bill of Materials (SBOM)
- CISA Software Acquisition Guide for Government Enterprise Consumers