1# Coding guidelines 2 3For the most part, Wasmtime and Cranelift follow common Rust conventions and 4[pull request] (PR) workflows, though we do have a few additional things to 5be aware of. 6 7[pull request]: https://help.github.com/articles/about-pull-requests/ 8 9### `rustfmt` 10 11All PRs must be formatted according to rustfmt, and this is checked in the 12continuous integration tests. You can format code locally with: 13 14```sh 15$ cargo fmt 16``` 17 18at the root of the repository. You can find [more information about rustfmt 19online](https://github.com/rust-lang/rustfmt) too, such as how to configure 20your editor. 21 22### Minimum Supported `rustc` Version 23 24Wasmtime and Cranelift support the latest three stable releases of Rust. This 25means that if the latest version of Rust is 1.72.0 then Wasmtime supports Rust 261.70.0, 1.71.0, and 1.72.0. CI will test by default with 1.72.0 and there will 27be one job running the full test suite on Linux x86\_64 on 1.70.0. 28 29Some of the CI jobs depend on nightly Rust, for example to run rustdoc with 30nightly features, however these use pinned versions in CI that are updated 31periodically and the general repository does not depend on nightly features. 32 33Updating Wasmtime's MSRV is done by editing the `rust-version` field in the 34workspace root's `Cargo.toml` 35 36[Rust Update Policy for Firefox]: https://wiki.mozilla.org/Rust_Update_Policy_for_Firefox#Schedule 37