dev_guide: document cargo fmt

This commit is contained in:
Jake Hillion 2024-09-26 17:48:50 +01:00
parent 326ccb3385
commit 64f64dc8bc

View File

@ -30,6 +30,15 @@ load between scheduling domains becomes a difficult problem. sched_ext has a
common crate for calculating weights between scheduling domains. See the
`infeasible` crate in `rust/scx_utils/src` for the implementation.
## Rust
We use `cargo fmt` to ensure consistency in our Rust code. This runs on PRs in
the CI and will fail with a patch if your code doesn't match. We currently need
a nightly version of Rust to format so have pinned this for consistency. To run
locally (with rustup) run:
$ rustup install nightly-2024-09-10
$ cargo +nightly-2024-09-10 fmt
## Useful Tools
### perf