Thanks for helping build RustKVM. This guide covers the workflow and the checks your
change has to pass. AGENTS.md is the authoritative reference for the
architecture, module tree, conventions and gotchas; read it before larger changes.
By participating you agree to follow the Code of Conduct.
- Report a bug or request a feature through the issue templates.
- Report a vulnerability privately, as described in
SECURITY.md. - Send a pull request against the
devbranch (the default branch).
| You are changing | You need |
|---|---|
Backend (app/, crates/rkvm-*) |
Nightly Rust and the GStreamer dev packages (libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev) on an x86_64 Linux host |
Frontend (crates/rkvm-web) |
Stable Rust, the wasm32-unknown-unknown target and Trunk |
| Anything you want to run on a device | The RK3588 cross toolchain and the self-built stage2 Rust toolchain, see the README |
The backend embeds crates/rkvm-web/dist/ at compile time. For backend-only work a stub
is enough:
mkdir -p crates/rkvm-web/dist && touch crates/rkvm-web/dist/index.htmlcargo +nightly fmt --all
cargo +nightly clippy --workspace --release --all-targets -- -D warnings
cargo +nightly test --workspace
cargo deny checkFor frontend changes, from crates/rkvm-web:
cargo +nightly fmt --all
cargo clippy --locked --all-targets --target wasm32-unknown-unknown -- -D warnings
trunk build --lockedBuild and deploy to a device:
./dev_deploy.sh -r <device_ip> [-u root]Every push and pull request to main and dev runs these workflows.
.github/workflows/ci.yml (required check: CI Success)
| Job | Command |
|---|---|
rustfmt |
cargo fmt --all -- --check |
cargo deny |
cargo deny check --all-features (licenses, bans, sources, advisories) |
clippy |
cargo clippy --workspace --release --all-targets --locked -- -D warnings |
clippy (aarch64) |
the same, with --target aarch64-unknown-linux-gnu (type-check only, no link) |
cargo test |
cargo test --workspace --locked |
.github/workflows/web.yml runs when crates/rkvm-web/** or crates/rkvm-proto/**
changes (required check: Web CI Success): rustfmt, clippy for
wasm32-unknown-unknown, trunk build --locked, and cargo deny.
- No
#[allow(...)]suppressions anywhere in the tree. Fix or remove the offending code. - No new
unwrap()/expect()in production paths; useanyhow::Resultand?. - No hot-path allocations. Video and audio frames stay zero-copy
(
bytes::Bytes::from_owner(MappedBuffer)); never.to_vec()a GStreamer buffer. - Periodic loops set
MissedTickBehavior::Delay; one-shot delays usetokio::time::sleep. - Singletons (
CloudManager,ConfigManager) are reached through theirget_*functions. - Shared protocol types live in
rkvm-proto, not duplicated inapp/orrkvm-web/. - Tests are integration tests in each crate's
tests/directory, not#[cfg(test)]modules. Adding or removing an RPC method means updatingapp/tests/rpc_methods.txt. - Logging uses structured
tracingfields:error!unrecoverable,warn!recoverable,info!lifecycle,debug!/trace!per-event detail. - Comments explain only a non-obvious why; every
unsafeblock has a// SAFETY:note. - Update
AGENTS.mdwhen the module tree or a build invariant changes.
Keep pull requests focused on one change, and fill in the pull request template.
Labels are defined in .github/labels.yml and synced to the
repository on every change to dev. Pull requests get area: and component labels
automatically from the paths they touch (.github/labeler.yml);
add breaking or skip-changelog by hand when they apply, since labels drive the
sections of the generated release notes.
- Workspace dependencies live in the root
[workspace.dependencies]; member crates use<dep>.workspace = true. - Some crates are deliberately held back (
reqwest0.12,webrtc,rustls0.23,libc0.2,socketioxide); the reasons are documented in the rootCargo.tomland inAGENTS.md. Major bumps of these need a manual review. - Dependabot opens weekly grouped PRs for patch and minor updates of both lockfiles and of GitHub Actions.
- Every git dependency must be listed in
deny.tomlunder[sources].allow-git.
- Bump
versionin the workspaceCargo.toml. - Move the
Unreleasedentries inCHANGELOG.mdunder the new version. - Tag the commit:
git tag -a vX.Y.Z -m "release vX.Y.Z" && git push origin vX.Y.Z. The tag must equal the workspace version. .github/workflows/release.ymlbuilds the frontend, cross-buildsrustkvm_appin therk3588-buildkitimage, and publishesrustkvm_app-aarch64-unknown-linux-gnuwith a.sha256checksum to the GitHub release.
By contributing you agree that your contributions are licensed under GPL-2.0-only, the license of this project.