@@ -10,7 +10,9 @@ We use an RFC process to maintain our code standards. They currently live in the
10
10
11
11
## Building and setting up a development workspace
12
12
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 ) ).
14
16
15
17
### Prerequisites
16
18
@@ -34,11 +36,12 @@ cd fuel-core
34
36
35
37
` rustup ` is the official toolchain manager for Rust.
36
38
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:
38
40
39
41
``` sh
40
- rustup component add rustfmt
41
42
rustup component add clippy
43
+ rustup toolchain install nightly
44
+ rustup component add rustfmt --toolchain nightly
42
45
```
43
46
44
47
### Building and testing
@@ -56,14 +59,15 @@ This command will run `cargo build` and also dump the latest schema into `/asset
56
59
Linting is done using rustfmt and clippy, which are each separate commands:
57
60
58
61
``` sh
59
- cargo fmt --all --check
62
+ cargo +nightly fmt --all --check
60
63
```
61
64
62
65
``` sh
63
66
cargo clippy --all-targets
64
67
```
65
68
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.
67
71
68
72
Testing is simply done using Cargo:
69
73
0 commit comments