Commit 70aaaa3
build: optimize Rust build caching with sccache, shared plugin target dir, and cargo-sweep (#224)
* build: optimize Rust build caching with sccache, shared plugin target dir, and cargo-sweep
- Add .cargo/config.toml with sccache as default rustc-wrapper for
transparent compilation caching across cargo clean cycles
- Add shared CARGO_TARGET_DIR for all native plugin builds, deduplicating
common dependency compilation (serde, tokio, etc.) across 11 plugins
- Add 'just sweep' recipe as a lightweight alternative to cargo clean,
pruning only stale artifacts older than N days (default: 7)
- Update all plugin build, lint, fix, upload, and copy recipes to use
the shared target/plugins/ directory
- Update plugin.yml artifact paths, official-plugins.json, docs, READMEs,
and build_official_plugins.sh to reflect new shared target layout
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
* fix(build): comment out sccache in .cargo/config.toml to avoid breaking CI
CI runners don't have sccache installed, so a hard-coded rustc-wrapper
breaks all cargo invocations. Keep the config as a commented-out opt-in
that developers can enable locally after installing sccache.
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
* fix(build): set CARGO_TARGET_DIR in sweep recipe for plugin loop
The plugin sweep loop was running cargo sweep without CARGO_TARGET_DIR,
targeting nonexistent per-plugin target/ dirs instead of the shared
target/plugins/ directory.
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
* fix(ci): update marketplace-build rust-cache for shared plugin target dir
The marketplace build now uses CARGO_TARGET_DIR=target/plugins, so the
rust-cache workspace config needs to point to the shared target dir
instead of per-plugin workspace entries.
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
* fix(build): update gen-docs-reference and marketplace CI for shared plugin target dir
- gen-docs-reference.rs: also search target/plugins/release/ for plugin
artifacts alongside the legacy per-plugin target dirs
- marketplace-build.yml: restore dynamic workspace collection but point
each plugin workspace to the shared target dir (../../../target/plugins)
so rust-cache correctly hashes plugin Cargo.lock files for cache keys
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
* refactor(build): simplify sweep to single invocation on shared plugin target dir
Since all plugins share target/plugins/, the per-plugin loop was
redundant — each iteration swept the same directory. Replace with a
single cargo sweep call using CARGO_TARGET_DIR.
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
* fix(build): deduplicate plugin artifacts by filename in gen-docs-reference
During transition from per-plugin to shared target dir, both paths may
contain the same plugin .so. Add dedup_by filename after sort+dedup to
prevent duplicate plugin entries in generated docs.
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
* fix(build): use HashSet for filename dedup in gen-docs-reference
dedup_by only removes consecutive duplicates, but same-filename paths
from different directories are not adjacent after sorting by full path.
Use a HashSet to properly deduplicate by filename regardless of order.
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
* style: format gen-docs-reference.rs
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
* fix(build): use is_some_and instead of map_or to satisfy clippy
Replace map_or(false, ...) with is_some_and(...) per
clippy::unnecessary_map_or lint.
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
* style: format gen-docs-reference.rs
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
* ci: install sccache on all CI runners via mozilla-actions/sccache-action
Enable sccache as the default rustc wrapper in .cargo/config.toml
(previously commented out) now that all CI jobs that compile Rust have
mozilla-actions/sccache-action@v0.0.9 installed. This caches compiled
crate artifacts by input hash, making rebuilds after cargo clean
near-instant for cached crates.
Affected workflows: skit.yml (lint, test, test-gpu, build),
plugins.yml (lint-simple, lint-whisper, lint-nllb, lint-sherpa),
e2e.yml, release.yml, marketplace-build.yml.
The format job in plugins.yml is excluded since cargo fmt doesn't
invoke rustc and thus doesn't need the wrapper.
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
* docs: add sccache as a prerequisite in CONTRIBUTING.md
Document sccache as a required build tool alongside Rust, Bun, and Just.
Include installation command and RUSTC_WRAPPER escape hatch tip.
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
* fix: address review findings for build caching PR
- Make sccache env-based opt-in instead of hard requirement in
.cargo/config.toml (CI sets RUSTC_WRAPPER via sccache-action)
- Document cargo-sweep as optional prerequisite in CONTRIBUTING.md
- Add guard to sweep recipe checking for cargo-sweep installation
- Remove no-op CARGO_TARGET_DIR from cargo fmt invocations
- Add TODO comment for legacy per-plugin target search removal
Signed-off-by: Devin AI <devin@streamkit.dev>
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
---------
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Signed-off-by: Devin AI <devin@streamkit.dev>
Co-authored-by: StreamKit Devin <devin@streamkit.dev>
Co-authored-by: Claudio Costa <cstcld91@gmail.com>1 parent f832f42 commit 70aaaa3
File tree
33 files changed
+163
-83
lines changed- .cargo
- .github/workflows
- apps/skit/src/bin
- docs/src/content/docs/reference/plugins
- marketplace
- plugins/native
- helsinki
- kokoro
- matcha
- nllb
- piper
- pocket-tts
- sensevoice
- supertonic
- vad
- whisper
- scripts/marketplace
33 files changed
+163
-83
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
113 | | - | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
| 106 | + | |
| 107 | + | |
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
| |||
153 | 157 | | |
154 | 158 | | |
155 | 159 | | |
| 160 | + | |
| 161 | + | |
156 | 162 | | |
157 | 163 | | |
158 | 164 | | |
| |||
198 | 204 | | |
199 | 205 | | |
200 | 206 | | |
| 207 | + | |
| 208 | + | |
201 | 209 | | |
202 | 210 | | |
203 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
| 105 | + | |
| 106 | + | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
| |||
122 | 126 | | |
123 | 127 | | |
124 | 128 | | |
| 129 | + | |
| 130 | + | |
125 | 131 | | |
126 | 132 | | |
127 | 133 | | |
| |||
173 | 179 | | |
174 | 180 | | |
175 | 181 | | |
| 182 | + | |
| 183 | + | |
176 | 184 | | |
177 | 185 | | |
178 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
50 | 69 | | |
51 | 70 | | |
52 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1293 | 1293 | | |
1294 | 1294 | | |
1295 | 1295 | | |
| 1296 | + | |
1296 | 1297 | | |
| 1298 | + | |
1297 | 1299 | | |
1298 | 1300 | | |
1299 | 1301 | | |
| |||
1304 | 1306 | | |
1305 | 1307 | | |
1306 | 1308 | | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
1307 | 1318 | | |
1308 | 1319 | | |
1309 | 1320 | | |
| |||
1319 | 1330 | | |
1320 | 1331 | | |
1321 | 1332 | | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
1322 | 1338 | | |
1323 | 1339 | | |
1324 | 1340 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
0 commit comments