@zackees/soldr 0.8.21 → 0.8.22

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 +34 -11
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -169,13 +169,19 @@ When you run `soldr`, the tool should do the obvious thing:
169
169
  - pick MSVC on Windows by default
170
170
  - fetch the tool you asked for
171
171
  - cache it locally
172
- - run the built-in zccache service so Rust builds get transparent caching without manual wrapper setup
172
+ - host its embedded zccache service so Rust builds get transparent caching
173
+ without manual wrapper or daemon setup
173
174
 
174
175
  If soldr solves that one problem well, it becomes a super tool: the command you reach for first, because it makes the rest of the stack behave.
175
176
 
176
177
  - **Tool acquisition** (the crgx half): Need `maturin`, `cargo-dylint`, or any crate binary? soldr fetches a pre-built binary from GitHub Releases in seconds. No `cargo install` from source. Cached locally for instant reuse. On `0.5.x`, this is still an upstream trust decision rather than a repo-side trust guarantee; see [docs/TRUST_BOUNDARIES.md](./docs/TRUST_BOUNDARIES.md).
177
178
 
178
- - **Compilation caching** (the zccache half): `soldr cargo ...` uses the zccache service compiled into Soldr. soldr owns the daemon/session wiring and keeps its object store under the active Soldr root at `cache/zccache/daemon-state/embedded-v1/<zccache-version>/objects`, so production and development roots remain isolated.
179
+ - **Compilation caching** (the zccache half): `soldr cargo ...` routes rustc
180
+ invocations through the zccache service embedded in `soldr-daemon`. zccache
181
+ is compiled into the Soldr binaries; there is no separately downloaded or
182
+ standalone zccache daemon. Soldr owns the build-session wiring and keeps its
183
+ object store under the active Soldr root at
184
+ `cache/zccache/daemon-state/embedded-v1/<zccache-version>/objects`.
179
185
 
180
186
  ```bash
181
187
  # Build through soldr's front door:
@@ -203,6 +209,11 @@ soldr cargo-dylint check
203
209
  soldr rustfmt src/main.rs
204
210
  ```
205
211
 
212
+ Rustfmt still runs through Soldr. Recursive invocations always execute the real
213
+ formatter because Cargo's explicit crate-root argv does not include child
214
+ modules that rustfmt discovers itself. A content-marker shortcut is used only
215
+ for invocations that explicitly set `skip_children=true`.
216
+
206
217
  ## Use soldr as your PEP 517 build backend (instead of maturin)
207
218
 
208
219
  For Rust+Python packages, point `pyproject.toml` at soldr instead of
@@ -305,7 +316,11 @@ flowchart TD
305
316
  B -->|"anything else<br/>maturin · cargo-nextest · cbindgen · ..."| E["<b>Tool-fetch mode</b><br/>resolve via known_tools,<br/>download from GitHub Releases,<br/>exec the fetched binary."]
306
317
  ```
307
318
 
308
- When you run `soldr cargo build`, the two other modes both come into play. soldr acts as the dispatch-mode front door, then cargo re-invokes soldr once per crate as the RUSTC_WRAPPER — that second soldr is the cache-mode instance that talks to the managed zccache daemon:
319
+ When you run `soldr cargo build`, the two other modes both come into play.
320
+ soldr acts as the dispatch-mode front door, then cargo re-invokes soldr once
321
+ per crate as the `RUSTC_WRAPPER` — that second soldr is the cache-mode
322
+ instance that sends the compile to the zccache service embedded in
323
+ `soldr-daemon`:
309
324
 
310
325
  ```mermaid
311
326
  sequenceDiagram
@@ -314,24 +329,27 @@ sequenceDiagram
314
329
  participant S1 as soldr (front door)
315
330
  participant C as cargo
316
331
  participant S2 as soldr (RUSTC_WRAPPER)
317
- participant Z as zccache daemon
332
+ participant D as soldr-daemon
333
+ participant Z as embedded zccache
318
334
  participant R as real rustc
319
335
 
320
336
  U->>S1: soldr cargo build --release
321
337
  S1->>S1: dispatch mode: cargo verb
322
- S1->>Z: start managed zccache if needed
323
338
  S1->>C: exec cargo (RUSTC_WRAPPER=soldr)
324
339
  loop per crate
325
340
  C->>S2: soldr [path-to-rustc] [args]
326
- S2->>Z: query cache (hash of inputs)
341
+ S2->>D: stream compile request
342
+ D->>Z: compile (hash inputs)
327
343
  alt cache hit
328
- Z-->>S2: cached artifact
344
+ Z-->>D: cached artifact
345
+ D-->>S2: streamed result
329
346
  S2-->>C: emit artifact, exit 0
330
347
  else cache miss
331
348
  Z->>R: forward to rustc
332
349
  R-->>Z: fresh artifact
333
350
  Z->>Z: store keyed by input hash
334
- Z-->>S2: artifact
351
+ Z-->>D: artifact
352
+ D-->>S2: streamed result
335
353
  S2-->>C: emit artifact, exit 0
336
354
  end
337
355
  end
@@ -339,6 +357,11 @@ sequenceDiagram
339
357
  S1-->>U: exit
340
358
  ```
341
359
 
360
+ The wrapper may run from a compiler-named multicall shim, but daemon recovery
361
+ always executes a canonical `soldr-daemon` alias. A daemon-lifetime singleton
362
+ lock, bind-before-publish startup, and PID/socket ownership checks prevent an
363
+ older or idle-timed-out process from deleting a newer daemon's endpoint.
364
+
342
365
  Tool fetches are much simpler — no cargo, no rustc, no wrapper handshake:
343
366
 
344
367
  ```text
@@ -378,10 +401,10 @@ If you also have many separate test binaries, consider consolidating them under
378
401
 
379
402
  ## Design goals
380
403
 
381
- - **One obvious command**: Fetch tools, pick the right Windows target, and run through managed zccache through the same entry point.
404
+ - **One obvious command**: Fetch tools, pick the right Windows target, and run through Soldr's embedded zccache service through the same entry point.
382
405
  - **Front-door builds**: `soldr cargo ...` is the primary build UX.
383
- - **Invisible caching**: `soldr cargo ...` uses a soldr-managed zccache by default, with `soldr --no-cache cargo ...` as the opt-out.
384
- - **Real cache controls**: `soldr status`, `soldr cache`, and `soldr clean` report and manage the soldr-managed zccache state, while `soldr purge` removes all Soldr-managed cache artifacts for bug clearing and benchmarking.
406
+ - **Invisible caching**: `soldr cargo ...` uses the zccache service embedded in `soldr-daemon` by default, with `soldr --no-cache cargo ...` as the opt-out.
407
+ - **Real cache controls**: `soldr status`, `soldr cache`, and `soldr clean` report and manage embedded-zccache state, while `soldr purge` removes all Soldr-managed cache artifacts for bug clearing and benchmarking.
385
408
  - **One cache boundary**: official soldr keeps its tools and cache state under `~/.soldr/`; development builds use `~/.soldr-dev/`. Use `SOLDR_CACHE_DIR` to select an explicit root.
386
409
  - **Bounded while idle**: the long-lived daemon owns only its selected root,
387
410
  checks pressure every five minutes, expires old state daily, and installs no
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zackees/soldr",
3
- "version": "0.8.21",
3
+ "version": "0.8.22",
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",