Every push / PR to main and dev runs .github/workflows/ci.yml which enforces:
| Job | Command | Purpose |
|---|---|---|
rustfmt |
cargo fmt --all -- --check |
Code formatting |
clippy |
cargo clippy --workspace --release --all-targets -- -D warnings |
Lints (no #[allow] allowed; see AGENTS.md) |
build (host) |
cargo build --workspace --release --locked |
Host-target compilation |
rustdoc |
cargo doc --workspace --no-deps --document-private-items (with -D warnings) |
Doc-comment validity + intra-doc links |
cargo audit |
cargo audit --deny warnings |
RustSec advisory check |
cargo deny |
cargo deny check |
License / bans / sources |
The CI Success job at the end is the required status check for branch protection.
# Quick check before pushing
cargo +nightly fmt --all
cargo +nightly clippy --workspace --release --all-targets -- -D warnings
cargo deny check sources licenses bans
# Cross-compile + deploy (requires stage2 toolchain — see AGENTS.md)
./dev_deploy.sh -r <device_ip>- No
#[allow(...)]suppressions. Fix or remove offending code. - No new
unwrap()/expect()outside init-time invariants. - No hot-path allocations. Use
bytes::Byteszero-copy patterns; seepipeline.rsfor the reference implementation. - Periodic loops must set
MissedTickBehavior::Delay. - Singletons (
CloudManager,ConfigManager) accessed viaget_*functions, not::new(). - Log levels:
error!for unrecoverable,warn!for recoverable,info!for lifecycle,debug!/trace!for per-event detail. - Update
AGENTS.mdif module tree or build invariants change.
- Bump
versionin workspaceCargo.toml. - Update
CHANGELOG.md. - Tag:
git tag -a v0.x.y -m "release v0.x.y" && git push origin v0.x.y. .github/workflows/release.ymlwill produce a cross-compiledrustkvm_appartefact and attach it to the GitHub release.
Note: canonical production builds use the project's self-built stage2 toolchain via dev_deploy.sh. The CI release artefact is built with stable nightly + -Z build-std=std,panic_abort and is suitable for smoke-testing, not as the canonical production binary.
- Workspace deps live in root
[workspace.dependencies]; sub-crates pull via<dep>.workspace = true. - Major-version bumps require manual review (see
AGENTS.mdGotcha #11). - Dependabot opens weekly PRs for patch/minor updates; major bumps are ignored for pinned crates (
socketioxide,reqwest,webrtc,rustls,libc). - All git deps must be explicitly listed in
deny.tomlunder[sources].allow-git.