@zackees/soldr 0.8.0 → 0.8.1
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 +2 -2
- package/contracts/zccache-runtime.v1.json +0 -2
- package/package.json +1 -1
- package/scripts/install.js +10 -5
- package/scripts/test-npm-package.js +5 -4
package/README.md
CHANGED
|
@@ -128,8 +128,8 @@ soldr cargo build --target aarch64-pc-windows-msvc
|
|
|
128
128
|
|
|
129
129
|
The canonical multi-platform GitHub Actions tutorial lives in [`zackees/setup-soldr#90`](https://github.com/zackees/setup-soldr/issues/90).
|
|
130
130
|
|
|
131
|
-
For
|
|
132
|
-
|
|
131
|
+
For Windows x64 → Windows GNU builds via managed MinGW-w64 GCC, and Linux →
|
|
132
|
+
Windows MSVC cross-compilation via `cargo-xwin`,
|
|
133
133
|
see [docs/CROSS_COMPILE.md](./docs/CROSS_COMPILE.md).
|
|
134
134
|
|
|
135
135
|
### CI cache lineage
|
package/package.json
CHANGED
package/scripts/install.js
CHANGED
|
@@ -14,7 +14,7 @@ const PACKAGE_ROOT = path.resolve(__dirname, "..");
|
|
|
14
14
|
const PACKAGE_JSON = require(path.join(PACKAGE_ROOT, "package.json"));
|
|
15
15
|
|
|
16
16
|
// Every release ships a single .tar.zst per target that bundles soldr
|
|
17
|
-
// alongside soldr-
|
|
17
|
+
// alongside soldr-daemon, same-target crgx, and same-target
|
|
18
18
|
// cargo-chef. One fetch installs everything, and `bin/soldr.js` wires
|
|
19
19
|
// SOLDR_CRGX_LOCAL_DIR and SOLDR_CARGO_CHEF_LOCAL_DIR to the install dir
|
|
20
20
|
// so soldr's runtime resolver finds those bundled tools without going
|
|
@@ -26,12 +26,16 @@ const TARGETS = {
|
|
|
26
26
|
"linux-x64-musl": { triple: "x86_64-unknown-linux-musl", binary: "soldr" },
|
|
27
27
|
"linux-arm64-gnu": { triple: "aarch64-unknown-linux-gnu", binary: "soldr" },
|
|
28
28
|
"linux-arm64-musl": { triple: "aarch64-unknown-linux-musl", binary: "soldr" },
|
|
29
|
-
"darwin-x64": { triple: "x86_64-apple-darwin", binary: "soldr" },
|
|
30
29
|
"darwin-arm64": { triple: "aarch64-apple-darwin", binary: "soldr" },
|
|
31
30
|
"win32-x64": { triple: "x86_64-pc-windows-msvc", binary: "soldr.exe" },
|
|
32
31
|
"win32-arm64": { triple: "aarch64-pc-windows-msvc", binary: "soldr.exe" },
|
|
33
32
|
};
|
|
34
33
|
|
|
34
|
+
const UNSUPPORTED_TARGETS = {
|
|
35
|
+
"darwin-x64":
|
|
36
|
+
"x86_64-apple-darwin release archives are intentionally not published; install from PyPI sdist or build from source",
|
|
37
|
+
};
|
|
38
|
+
|
|
35
39
|
// Files we expect to find at the root of every extracted release
|
|
36
40
|
// archive. Names line up with what `release-auto.yml`'s
|
|
37
41
|
// `Stage soldr release binaries`, `Build crgx from pinned source`, and
|
|
@@ -86,7 +90,8 @@ function platformTarget(platform = process.platform, arch = process.arch, libc =
|
|
|
86
90
|
: `${platform}-${arch}`;
|
|
87
91
|
const target = TARGETS[key];
|
|
88
92
|
if (!target) {
|
|
89
|
-
|
|
93
|
+
const detail = UNSUPPORTED_TARGETS[key] ? `: ${UNSUPPORTED_TARGETS[key]}` : "";
|
|
94
|
+
throw new Error(`unsupported platform for soldr npm package: ${key}${detail}`);
|
|
90
95
|
}
|
|
91
96
|
return target;
|
|
92
97
|
}
|
|
@@ -248,7 +253,7 @@ async function install() {
|
|
|
248
253
|
fs.rmSync(nativeDir, { recursive: true, force: true });
|
|
249
254
|
fs.mkdirSync(nativeDir, { recursive: true });
|
|
250
255
|
|
|
251
|
-
// Copy every bundled binary so soldr has its
|
|
256
|
+
// Copy every bundled binary so soldr has its daemon and can find
|
|
252
257
|
// crgx via SOLDR_CRGX_LOCAL_DIR and cargo-chef via
|
|
253
258
|
// SOLDR_CARGO_CHEF_LOCAL_DIR.
|
|
254
259
|
// `bin/soldr.js` wires these env vars before exec. The archive
|
|
@@ -296,7 +301,7 @@ async function install() {
|
|
|
296
301
|
fs.copyFileSync(manifestSrc, path.join(nativeDir, zccacheContract.MANIFEST_NAME));
|
|
297
302
|
|
|
298
303
|
console.log(
|
|
299
|
-
`soldr: installed ${target.triple} (soldr +
|
|
304
|
+
`soldr: installed ${target.triple} (soldr + daemon + crgx + cargo-chef) into ${nativeDir}`,
|
|
300
305
|
);
|
|
301
306
|
} finally {
|
|
302
307
|
fs.rmSync(tmp, { recursive: true, force: true });
|
|
@@ -100,7 +100,10 @@ assert.strictEqual(
|
|
|
100
100
|
// Default (no libc arg) falls back to detectLibc; on most CI hosts that's
|
|
101
101
|
// gnu. We don't assert the triple here — just that the call resolves.
|
|
102
102
|
assert.ok(install.platformTarget("linux", "x64").triple.startsWith("x86_64-unknown-linux-"));
|
|
103
|
-
assert.
|
|
103
|
+
assert.throws(
|
|
104
|
+
() => install.platformTarget("darwin", "x64"),
|
|
105
|
+
/x86_64-apple-darwin release archives are intentionally not published/,
|
|
106
|
+
);
|
|
104
107
|
assert.strictEqual(install.platformTarget("darwin", "arm64").triple, "aarch64-apple-darwin");
|
|
105
108
|
assert.strictEqual(install.platformTarget("win32", "x64").triple, "x86_64-pc-windows-msvc");
|
|
106
109
|
assert.strictEqual(install.platformTarget("win32", "arm64").triple, "aarch64-pc-windows-msvc");
|
|
@@ -165,7 +168,7 @@ for (const [key, target] of Object.entries(install.TARGETS || {})) {
|
|
|
165
168
|
);
|
|
166
169
|
}
|
|
167
170
|
|
|
168
|
-
// BUNDLED_BINARIES must include soldr, soldr-
|
|
171
|
+
// BUNDLED_BINARIES must include soldr, soldr-daemon, crgx, and
|
|
169
172
|
// cargo-chef. It must not require standalone zccache binaries.
|
|
170
173
|
assert.ok(
|
|
171
174
|
Array.isArray(install.BUNDLED_BINARIES),
|
|
@@ -174,8 +177,6 @@ assert.ok(
|
|
|
174
177
|
for (const required of [
|
|
175
178
|
"soldr",
|
|
176
179
|
"soldr-daemon",
|
|
177
|
-
"soldr-shim",
|
|
178
|
-
"soldr-clang-shim",
|
|
179
180
|
"crgx",
|
|
180
181
|
"cargo-chef",
|
|
181
182
|
]) {
|