Skip to content

Commit

Permalink
Merge pull request #422 from JakeStanger/docs/compilation
Browse files Browse the repository at this point in the history
docs(compilation): add sccache section
  • Loading branch information
JakeStanger authored Jan 25, 2024
2 parents bfec312 + 1b54276 commit db7c96b
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 db7c96b

Please sign in to comment.