Skip to content

Commit cf5146d

Browse files
committed
Updated CONTRIBUTING.md with nightly rustfmt
1 parent a3d321d commit cf5146d

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

CONTRIBUTING.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ We use an RFC process to maintain our code standards. They currently live in the
1010

1111
## Building and setting up a development workspace
1212

13-
Fuel Core is mostly written in Rust, but includes components written in C++ (RocksDB). We are currently using the latest Rust stable toolchain.
13+
Fuel Core is mostly written in Rust, but includes components written in C++ (RocksDB).
14+
We are currently using the latest Rust stable toolchain to build the project.
15+
But for `rustfmt`, we use Rust nightly toolchain because it provides more code style features(you can check [`rustfmt.toml`](.rustfmt.toml)).
1416

1517
### Prerequisites
1618

@@ -34,11 +36,12 @@ cd fuel-core
3436

3537
`rustup` is the official toolchain manager for Rust.
3638

37-
We use some additional components such as `rustfmt` and `clippy`, to install those:
39+
We use some additional components such as `clippy` and `rustfmt`(nightly), to install those:
3840

3941
```sh
40-
rustup component add rustfmt
4142
rustup component add clippy
43+
rustup toolchain install nightly
44+
rustup component add rustfmt --toolchain nightly
4245
```
4346

4447
### Building and testing
@@ -56,14 +59,15 @@ This command will run `cargo build` and also dump the latest schema into `/asset
5659
Linting is done using rustfmt and clippy, which are each separate commands:
5760

5861
```sh
59-
cargo fmt --all --check
62+
cargo +nightly fmt --all --check
6063
```
6164

6265
```sh
6366
cargo clippy --all-targets
6467
```
6568

66-
The test suite follows the Rust cargo standards. The GraphQL service will be instantiated by Tower and will emulate a server/client structure.
69+
The test suite follows the Rust cargo standards. The GraphQL service will be instantiated by
70+
Tower and will emulate a server/client structure.
6771

6872
Testing is simply done using Cargo:
6973

0 commit comments

Comments
 (0)