@zackees/soldr 0.8.43 → 0.9.0

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.
package/README.md CHANGED
@@ -1,12 +1,13 @@
1
1
  # Soldr / Rust
2
2
 
3
3
 
4
+
4
5
  <img width="1536" height="1024" alt="ChatGPT Image Apr 19, 2026, 09_43_32 PM" src="https://github.com/user-attachments/assets/87d94693-3542-4f4f-8b02-600bf0b9810e" />
5
6
 
7
+ *Beta software, please pin*
6
8
 
7
9
  *A tool to download rust tool sets and aggressive cache your build. **2× faster cross-PR builds** via content-addressed caching that swatinem's per-key cache cannot share. GH and local builds. Just add soldr before all your build commands.*
8
10
 
9
- Third-party comparison (soldr vs Swatinem/rust-cache vs ...): published from `zackees/setup-soldr` — see its `comparison-cluster` workflow and the rendered page once the migration in soldr#674 completes. The legacy `https://zackees.github.io/soldr/` page is being repurposed for soldr-internal per-scenario regression history (no third-party comparison surface lives on this repo anymore).
10
11
 
11
12
  [![CI](https://github.com/zackees/soldr/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/zackees/soldr/actions/workflows/ci.yml)
12
13
  [![Autonomous Release](https://github.com/zackees/soldr/actions/workflows/release-auto.yml/badge.svg?branch=main)](https://github.com/zackees/soldr/actions/workflows/release-auto.yml)
@@ -187,7 +188,6 @@ If soldr solves that one problem well, it becomes a super tool: the command you
187
188
  # Build through soldr's front door:
188
189
  soldr cargo build --release
189
190
  soldr cargo test
190
- soldr --no-cache cargo test
191
191
  soldr purge
192
192
  SOLDR_RUSTC_WRAPPER=sccache soldr cargo build
193
193
  SOLDR_RUSTC_WRAPPER=none soldr cargo build
@@ -404,7 +404,7 @@ If you also have many separate test binaries, consider consolidating them under
404
404
 
405
405
  - **One obvious command**: Fetch tools, pick the right Windows target, and run through Soldr's embedded zccache service through the same entry point.
406
406
  - **Front-door builds**: `soldr cargo ...` is the primary build UX.
407
- - **Invisible caching**: `soldr cargo ...` uses the zccache service embedded in `soldr-daemon` by default, with `soldr --no-cache cargo ...` as the opt-out.
407
+ - **Broker-owned caching**: `soldr cargo ...` uses the zccache service embedded in a broker-placed `soldr-daemon`; cacheable compiler work has one mandatory route.
408
408
  - **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.
409
409
  - **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.
410
410
  - **Bounded while idle**: the long-lived daemon owns only its selected root,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zackees/soldr",
3
- "version": "0.8.43",
3
+ "version": "0.9.0",
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",
@@ -21,15 +21,24 @@ const PACKAGE_JSON = require(path.join(PACKAGE_ROOT, "package.json"));
21
21
  // through the managed-download path.
22
22
  const ARCHIVE_EXT = zccacheContract.ARCHIVE_EXT;
23
23
 
24
+ // soldr#2453: the Autonomous Release matrix was reduced to exactly 3
25
+ // published native targets. x86_64 Linux ships only the statically-linked
26
+ // musl binary -- it is verified statically linked before staging
27
+ // (release-auto.yml -> "Verify musl binary is statically linked"), so it
28
+ // has no dynamic loader dependency and is the universal x86_64-linux
29
+ // artifact, running on glibc hosts too. There is no separate gnu-linux
30
+ // asset in this release, so the `-gnu` / `-musl` key split that used to
31
+ // exist for linux-x64 is gone: any x86_64 Linux host, on either libc,
32
+ // resolves to the single entry keyed `linux-x64` below -- there is no
33
+ // glibc-version gate on this selection. arm64 Linux (gnu and musl), Intel
34
+ // macOS (darwin-x64), and Windows arm64 are not published in this release
35
+ // and are intentionally absent from this map -- platformTarget() throws a
36
+ // clear error for them instead of letting a lookup miss fall through to a
37
+ // 404 download.
24
38
  const TARGETS = {
25
- "linux-x64-gnu": { triple: "x86_64-unknown-linux-gnu", binary: "soldr" },
26
- "linux-x64-musl": { triple: "x86_64-unknown-linux-musl", binary: "soldr" },
27
- "linux-arm64-gnu": { triple: "aarch64-unknown-linux-gnu", binary: "soldr" },
28
- "linux-arm64-musl": { triple: "aarch64-unknown-linux-musl", binary: "soldr" },
29
- "darwin-x64": { triple: "x86_64-apple-darwin", binary: "soldr" },
39
+ "linux-x64": { triple: "x86_64-unknown-linux-musl", binary: "soldr" },
30
40
  "darwin-arm64": { triple: "aarch64-apple-darwin", binary: "soldr" },
31
41
  "win32-x64": { triple: "x86_64-pc-windows-msvc", binary: "soldr.exe" },
32
- "win32-arm64": { triple: "aarch64-pc-windows-msvc", binary: "soldr.exe" },
33
42
  };
34
43
 
35
44
  // Files we expect to find at the root of every extracted release
@@ -53,6 +62,13 @@ const BUNDLED_BINARIES = zccacheContract.RELEASE_BUNDLED_BINARIES;
53
62
  // Kept in lockstep with the `--max-glibc` ceiling in release-auto.yml by a
54
63
  // check in test-npm-package.js. When the release build is fixed to link
55
64
  // against a 2.17 baseline that ceiling drops, and this must follow it down.
65
+ //
66
+ // soldr#2453: no gnu-linux asset is published anymore (see TARGETS above),
67
+ // so this constant no longer selects anything in platformTarget() -- every
68
+ // x86_64 Linux host takes the musl asset regardless of glibc version. It is
69
+ // kept, unchanged, only because test-npm-package.js still asserts it stays
70
+ // in lockstep with the `--max-glibc` value release-auto.yml passes to
71
+ // verify_glibc_baseline.py, and detectLibc() below still consults it.
56
72
  const MIN_GLIBC_FOR_GNU = "2.39";
57
73
 
58
74
  function compareVersions(left, right) {
@@ -69,7 +85,15 @@ function compareVersions(left, right) {
69
85
  return 0;
70
86
  }
71
87
 
72
- // Decide which Linux artifact this host should download. Ordered probes:
88
+ // Classify this host's libc family. Before soldr#2453 this decided which
89
+ // Linux artifact to download (gnu vs musl); now that the release matrix
90
+ // publishes only the musl x86_64-linux asset, platformTarget() below no
91
+ // longer branches on the result -- every linux-x64 host takes the musl
92
+ // download regardless of libc. The detector itself is kept (and still
93
+ // covered directly by test-npm-package.js, and still consulted by
94
+ // MIN_GLIBC_FOR_GNU's own lockstep bookkeeping) since it remains an
95
+ // accurate, independently useful "what libc is this host" probe. Ordered
96
+ // probes:
73
97
  //
74
98
  // 1. A musl loader in /lib means the SYSTEM is musl, and that outranks
75
99
  // whatever Node was linked against. This has to run first: a glibc Node
@@ -84,13 +108,8 @@ function compareVersions(left, right) {
84
108
  // musl is the safe end of every unknown because that artifact is verified
85
109
  // statically linked before it is ever staged (release-auto.yml → "Verify musl
86
110
  // binary is statically linked"), so it has no dynamic loader dependency and
87
- // runs on glibc hosts too. The mistakes are not symmetric:
88
- //
89
- // pick musl, actually glibc → works, nothing to resolve
90
- // pick gnu, actually musl → hard failure, "soldr: not found"
91
- // pick gnu, glibc too old → hard failure, "GLIBC_2.39 not found"
92
- //
93
- // Only the first is recoverable.
111
+ // runs on glibc hosts too. That property is also exactly why soldr#2453
112
+ // could drop the gnu asset from the release matrix in the first place.
94
113
  //
95
114
  // `probes` exists so the branches can be tested on any host; the defaults are
96
115
  // the real detectors.
@@ -127,14 +146,24 @@ function detectLibc(platform = process.platform, probes = {}) {
127
146
  return "musl";
128
147
  }
129
148
 
149
+ // soldr#2453: the release matrix publishes exactly 3 native targets, so
150
+ // resolution is a flat `<platform>-<arch>` lookup -- linux no longer keys
151
+ // on libc because both families download the same musl asset (see TARGETS
152
+ // above), and there is no glibc-version gate on that download. The `libc`
153
+ // parameter is still accepted (and still defaults to detectLibc()) purely
154
+ // for call-site/back-compat with existing callers and tests; it plays no
155
+ // role in which target is returned.
130
156
  function platformTarget(platform = process.platform, arch = process.arch, libc = detectLibc(platform)) {
131
- const key =
132
- platform === "linux"
133
- ? `${platform}-${arch}-${libc || "musl"}`
134
- : `${platform}-${arch}`;
157
+ void libc;
158
+ const key = `${platform}-${arch}`;
135
159
  const target = TARGETS[key];
136
160
  if (!target) {
137
- throw new Error(`unsupported platform for soldr npm package: ${key}`);
161
+ throw new Error(
162
+ `unsupported platform for soldr npm package: ${key}. This soldr release ` +
163
+ "publishes prebuilt binaries only for x86_64 Linux, Apple Silicon macOS " +
164
+ `(arm64), and x86_64 Windows. ${key} is not currently supported by a ` +
165
+ "prebuilt binary.",
166
+ );
138
167
  }
139
168
  return target;
140
169
  }
@@ -79,37 +79,58 @@ assert.deepStrictEqual(pkg.files, [
79
79
  const bin = fs.readFileSync(path.join(root, pkg.bin.soldr), "utf8");
80
80
  assert(bin.startsWith("#!/usr/bin/env node"), "bin/soldr.js must have a node shebang");
81
81
 
82
- // Linux: triple selection branches on libc. `platformTarget` accepts an
83
- // explicit `libc` arg so tests don't depend on the runtime detector.
82
+ // soldr#2453: the Autonomous Release matrix publishes exactly 3 native
83
+ // targets -- x86_64 Linux (musl, universal for glibc hosts too), Apple
84
+ // Silicon macOS, and x86_64 Windows. `platformTarget` accepts an explicit
85
+ // `libc` arg so tests don't depend on the runtime detector, but linux-x64
86
+ // no longer branches on it: both libc families resolve to the same musl
87
+ // asset because there is no separate gnu-linux release asset, and no
88
+ // glibc-version gate, anymore.
84
89
  assert.strictEqual(
85
90
  install.platformTarget("linux", "x64", "gnu").triple,
86
- "x86_64-unknown-linux-gnu",
91
+ "x86_64-unknown-linux-musl",
87
92
  );
88
93
  assert.strictEqual(
89
94
  install.platformTarget("linux", "x64", "musl").triple,
90
95
  "x86_64-unknown-linux-musl",
91
96
  );
92
- assert.strictEqual(
93
- install.platformTarget("linux", "arm64", "gnu").triple,
94
- "aarch64-unknown-linux-gnu",
95
- );
96
- assert.strictEqual(
97
- install.platformTarget("linux", "arm64", "musl").triple,
98
- "aarch64-unknown-linux-musl",
99
- );
100
- // Default (no libc arg) falls back to detectLibc; on most CI hosts that's
101
- // gnu. We don't assert the triple here — just that the call resolves.
102
- assert.ok(install.platformTarget("linux", "x64").triple.startsWith("x86_64-unknown-linux-"));
103
- // An explicitly-unknown libc must take the runs-anywhere build, matching
104
- // detectLibc's own unknown case rather than contradicting it.
97
+ // An explicitly-unknown libc must still take the runs-anywhere musl build.
105
98
  assert.strictEqual(
106
99
  install.platformTarget("linux", "x64", null).triple,
107
100
  "x86_64-unknown-linux-musl",
108
101
  );
109
- assert.strictEqual(install.platformTarget("darwin", "x64").triple, "x86_64-apple-darwin");
102
+ // Default (no libc arg) falls back to detectLibc; either family still
103
+ // resolves to the musl asset.
104
+ assert.strictEqual(install.platformTarget("linux", "x64").triple, "x86_64-unknown-linux-musl");
105
+
106
+ // arm64 Linux has no published asset in this release, for either libc
107
+ // family -- must throw a clear, actionable error rather than attempt a
108
+ // download that 404s.
109
+ assert.throws(
110
+ () => install.platformTarget("linux", "arm64", "gnu"),
111
+ /unsupported platform/,
112
+ "linux-arm64 (gnu) has no published asset and must throw",
113
+ );
114
+ assert.throws(
115
+ () => install.platformTarget("linux", "arm64", "musl"),
116
+ /unsupported platform/,
117
+ "linux-arm64 (musl) has no published asset and must throw",
118
+ );
119
+
110
120
  assert.strictEqual(install.platformTarget("darwin", "arm64").triple, "aarch64-apple-darwin");
111
121
  assert.strictEqual(install.platformTarget("win32", "x64").triple, "x86_64-pc-windows-msvc");
112
- assert.strictEqual(install.platformTarget("win32", "arm64").triple, "aarch64-pc-windows-msvc");
122
+
123
+ // Intel macOS and Windows arm64 have no published asset in this release.
124
+ assert.throws(
125
+ () => install.platformTarget("darwin", "x64"),
126
+ /unsupported platform/,
127
+ "darwin-x64 (Intel mac) has no published asset and must throw",
128
+ );
129
+ assert.throws(
130
+ () => install.platformTarget("win32", "arm64"),
131
+ /unsupported platform/,
132
+ "win32-arm64 has no published asset and must throw",
133
+ );
113
134
  assert.throws(() => install.platformTarget("freebsd", "x64"), /unsupported platform/);
114
135
 
115
136
  // detectLibc must return null on non-Linux platforms so the platform key