Skip to content

Commit 2ea2b8c

Browse files
lesebclaude
andauthored
docs: add sccache shared build cache section to getting started (vllm-project#47)
## Summary - Adds a new "Developing" section to the MkDocs documentation with a getting-started guide - Documents sccache setup, cache warming, and links to upstream sccache docs for installation and configuration - Helps contributors avoid full dependency rebuilds when switching branches or working across worktrees Similar to praxis-proxy/praxis#468. ## Test plan - [x] `mkdocs build --strict` passes with no errors - [ ] Verify the doc renders correctly on GitHub - [ ] Follow the setup instructions on a fresh checkout to confirm they work 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Sébastien Han <seb@redhat.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2719ece commit 2ea2b8c

2 files changed

Lines changed: 76 additions & 0 deletions

File tree

‎docs/developing/getting-started.md‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Getting Started
2+
3+
## Prerequisites
4+
5+
- Rust toolchain (MSRV 1.85)
6+
- [pre-commit](https://pre-commit.com/)
7+
8+
## Building
9+
10+
Install pre-commit hooks and build the project:
11+
12+
```console
13+
pre-commit install
14+
cargo build
15+
```
16+
17+
## Testing
18+
19+
```console
20+
cargo test
21+
```
22+
23+
## Linting and Formatting
24+
25+
```console
26+
cargo clippy --all-targets -- -D warnings # lint
27+
cargo fmt # format
28+
cargo fmt -- --check # check formatting only
29+
```
30+
31+
To run all pre-commit hooks manually:
32+
33+
```console
34+
pre-commit run --all-files
35+
```
36+
37+
## Shared Build Cache with sccache
38+
39+
[sccache] caches compiled artifacts so that switching
40+
branches, cleaning `target/`, or working across
41+
multiple git worktrees does not require rebuilding
42+
every dependency from scratch.
43+
44+
### Setup
45+
46+
[Install sccache][sccache-install], then add the
47+
following to your shell profile (`~/.bashrc`,
48+
`~/.zshrc`, etc.):
49+
50+
```sh
51+
export RUSTC_WRAPPER=$(which sccache)
52+
```
53+
54+
### Warming the cache
55+
56+
After setting up sccache, run a full clippy pass in any
57+
worktree to populate the cache:
58+
59+
```console
60+
cargo clippy --workspace --all-targets
61+
```
62+
63+
Subsequent builds reuse the cached artifacts
64+
automatically. Cargo still prints `Compiling` /
65+
`Checking` for every crate, but cache-hit compilations
66+
complete in milliseconds instead of seconds.
67+
68+
Check hit rates with `sccache --show-stats`. See
69+
[sccache usage][sccache-usage] for more configuration
70+
options.
71+
72+
[sccache]: https://github.com/mozilla/sccache
73+
[sccache-install]: https://github.com/mozilla/sccache#installation
74+
[sccache-usage]: https://github.com/mozilla/sccache#usage

‎mkdocs.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ markdown_extensions:
9292
nav:
9393
- Home: index.md
9494
- API Reference: api/index.md
95+
- Developing:
96+
- Getting Started: developing/getting-started.md
9597
- Community: community/index.md
9698

9799
extra:

0 commit comments

Comments
 (0)