1986f9f79SAlex Crichton# Coding guidelines
2986f9f79SAlex Crichton
3986f9f79SAlex CrichtonFor the most part, Wasmtime and Cranelift follow common Rust conventions and
4986f9f79SAlex Crichton[pull request] (PR) workflows, though we do have a few additional things to
5986f9f79SAlex Crichtonbe aware of.
6986f9f79SAlex Crichton
7986f9f79SAlex Crichton[pull request]: https://help.github.com/articles/about-pull-requests/
8986f9f79SAlex Crichton
9*47d3c8deSNick Fitzgerald### `rustfmt`
10986f9f79SAlex Crichton
11986f9f79SAlex CrichtonAll PRs must be formatted according to rustfmt, and this is checked in the
12986f9f79SAlex Crichtoncontinuous integration tests. You can format code locally with:
13986f9f79SAlex Crichton
14986f9f79SAlex Crichton```sh
15986f9f79SAlex Crichton$ cargo fmt
16986f9f79SAlex Crichton```
17986f9f79SAlex Crichton
18986f9f79SAlex Crichtonat the root of the repository. You can find [more information about rustfmt
19986f9f79SAlex Crichtononline](https://github.com/rust-lang/rustfmt) too, such as how to configure
20986f9f79SAlex Crichtonyour editor.
21986f9f79SAlex Crichton
22*47d3c8deSNick Fitzgerald### Minimum Supported `rustc` Version
23986f9f79SAlex Crichton
24986f9f79SAlex CrichtonWasmtime supports the current stable version of Rust.
25986f9f79SAlex Crichton
26986f9f79SAlex CrichtonCranelift supports stable Rust, and follows the [Rust Update Policy for
27986f9f79SAlex CrichtonFirefox].
28986f9f79SAlex Crichton
29986f9f79SAlex CrichtonSome of the developer scripts depend on nightly Rust, for example to run
30986f9f79SAlex Crichtonclippy and other tools, however we avoid depending on these for the main
31986f9f79SAlex Crichtonbuild.
32986f9f79SAlex Crichton
33986f9f79SAlex Crichton[Rust Update Policy for Firefox]: https://wiki.mozilla.org/Rust_Update_Policy_for_Firefox#Schedule
34