Skip to content

Commit

Permalink
docs(compilation): add sccache section
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeStanger committed Jan 25, 2024
1 parent bfec312 commit 1b54276
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/Compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,23 @@ then add the following:
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
```

## Caching

To speed up subsequent rebuilds, Mozilla's [sccache](https://github.com/mozilla/sccache) tool can be used.
This provides a cache of Rust modules which can be re-used when compiling any other crate.

Install the package for your distro, create/modify the `.cargo/config.toml` file inside the project dir,
then add the following:

```toml
[build]
rustc-wrapper = "/usr/bin/sccache"
```

> [!TIP]
> To get the most of out `sccache`,
> you can add this to `$HOME/.cargo/config.toml` to enable caching for all Cargo builds.
## Codegen Backend

> [!WARNING]
Expand Down

0 comments on commit 1b54276

Please sign in to comment.