Commit 29f2e9a
Add Claude Code on the web SessionStart hook for cargo warm-up
Web (cloud) sessions start from a fresh clone, so dependencies and the
build cache are cold. This adds a cloud-only SessionStart hook that warms
the Rust workspace before Claude starts working, so `cargo test`,
`cargo clippy`, and `cargo fmt` are immediately usable.
- .claude/hooks/session-start.sh: guarded on CLAUDE_CODE_REMOTE (no-op on
local checkouts); runs `cargo fetch --locked` then
`cargo build --workspace --all-targets`; logs verbose cargo output to a
temp file to keep session context clean; best-effort so a transient
failure never blocks session startup.
- .claude/settings.json: registers the hook on startup|resume.
- REUSE.toml: cover .claude/** under MPL-2.0 (settings.json carries no
inline SPDX header; the shell script has one).
Only the pre-installed cargo toolchain is exercised; the optional
Idris2/Zig recipes are not required for the Rust test/lint path and are
intentionally omitted.
Validated in a cloud session: hook exits 0, local-skip is a no-op,
`cargo clippy --workspace` and the integration tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017nyxs8RgqZa72PzrTu3L751 parent 1e20d0e commit 29f2e9a
3 files changed
Lines changed: 59 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
0 commit comments