mirror of
https://github.com/LemmyNet/lemmy-docs.git
synced 2025-01-24 18:45:49 +00:00
Use mold and sccache config.
This commit is contained in:
parent
a2d6beea20
commit
443f7b5be3
1 changed files with 6 additions and 5 deletions
|
@ -90,14 +90,15 @@ Use `cargo check` to find compilation errors. To start the Lemmy backend, run `c
|
|||
|
||||
After making changes, you need to format the code with `cargo +nightly fmt --all` and run the linter with `./scripts/lint.sh`.
|
||||
|
||||
If you'd like to speed up compilation times, you can add the following to `~/.cargo/config.toml` (requires nightly rust).
|
||||
If you'd like to speed up compilation times, you can install [mold](https://github.com/rui314/mold), and [sccache](https://github.com/mozilla/sccache), and add the following to `~/.cargo/config.toml` (requires nightly rust).
|
||||
|
||||
```toml
|
||||
[unstable]
|
||||
codegen-backend = true
|
||||
|
||||
[build]
|
||||
rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zthreads=16"]
|
||||
rustc-wrapper = "/usr/bin/sccache"
|
||||
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
linker = "clang"
|
||||
rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold", "-Z", "threads=16"]
|
||||
```
|
||||
|
||||
### Frontend development
|
||||
|
|
Loading…
Reference in a new issue