@zackees/soldr 0.7.12 → 0.7.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +29 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -167,6 +167,35 @@ soldr maturin build --release
167
167
  +-- not cached? --> download pre-built binary (2s) --> run
168
168
  ```
169
169
 
170
+ ## Linker speed (the other half of fast CI)
171
+
172
+ soldr caches `rustc` invocations. It does **not** cache the linker step. If your build links many binaries (multiple `tests/*.rs` files, several `[[bin]]` targets, examples, benches), the dominant cost is often `ld`, and zccache will not help with that.
173
+
174
+ On Linux, switch to the `mold` linker for ~5-10x faster linking. Add to your repo's `.cargo/config.toml`:
175
+
176
+ ```toml
177
+ [target.x86_64-unknown-linux-gnu]
178
+ linker = "clang"
179
+ rustflags = ["-C", "link-arg=-fuse-ld=mold"]
180
+
181
+ [target.x86_64-unknown-linux-musl]
182
+ linker = "clang"
183
+ rustflags = ["-C", "link-arg=-fuse-ld=mold"]
184
+ ```
185
+
186
+ Then in CI, install mold before any cargo step:
187
+
188
+ ```yaml
189
+ - name: Install mold linker
190
+ run: |
191
+ sudo apt-get update
192
+ sudo apt-get install -y --no-install-recommends mold
193
+ ```
194
+
195
+ macOS uses `ld64`, which is already fast and rarely worth swapping. Windows uses MSVC's linker, which `mold` does not target.
196
+
197
+ If you also have many separate test binaries, consider consolidating them under one `tests/<name>.rs` entry point with sub-modules. Fewer linker invocations is itself a multiplicative win on top of mold.
198
+
170
199
  ## Design goals
171
200
 
172
201
  - **One obvious command**: Fetch tools, pick the right Windows target, and run through managed zccache through the same entry point.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zackees/soldr",
3
- "version": "0.7.12",
3
+ "version": "0.7.15",
4
4
  "description": "Instant Rust tools and builds from one command.",
5
5
  "license": "BSD-3-Clause",
6
6
  "homepage": "https://github.com/zackees/soldr",