build(core,runtime): native websocket-darwin-arm64.node + drop build hatch
WebSocket native is now built for darwin-arm64 — source is at
github.com/SnowLuma/snowluma-websocket (cmake-js + node-addon-api,
clones to dev/snowluma-websocket and builds with `npm install`).
npm install in dev/snowluma-websocket → build/Release/snowluma_ws.node
cp → packages/runtime/native/websocket-darwin-arm64.node (102 KB)
Reverts the SNOWLUMA_BUILD_SKIP_NATIVES escape hatch in vite.config.ts
that 67f8bf3 added — no longer needed; the darwin native binary is
present. Keeps `packages/core/config/.gitignore` (independently useful
runtime-state hygiene). vite build now runs clean on darwin with no
env overrides; the runtime SNOWLUMA_DEV_NO_NATIVE=1 stub also becomes
optional (only needed if the operator wants to bypass WebSocket I/O
specifically).
Existing native binaries unchanged. CI invariant restored: every
release build must include every platform's native set.
This commit is contained in:
2 files changed
+4
-17
No files matched your search
@@ -70,14 +70,6 @@ const ffmpegSrcDir = path.resolve(nativeDir, 'ffmpeg');
|
|||||||
// Fail fast if any expected native binary is missing from packages/runtime/native/.
|
// Fail fast if any expected native binary is missing from packages/runtime/native/.
|
||||||
// vite-plugin-cp only emits a warning on missing source files; we want a hard
|
// vite-plugin-cp only emits a warning on missing source files; we want a hard
|
||||||
// error so CI can't accidentally ship an incomplete archive.
|
// error so CI can't accidentally ship an incomplete archive.
|
||||||
//
|
|
||||||
// Escape hatch: SNOWLUMA_BUILD_SKIP_NATIVES=1 downgrades the missing-native
|
|
||||||
// error to a warning. Use ONLY for local dev on platforms where prebuilt
|
|
||||||
// native binaries aren't available yet (e.g. darwin-arm64 — the websocket
|
|
||||||
// native source lives in a separate private build repo). The runtime
|
|
||||||
// websocket loader has its own `SNOWLUMA_DEV_NO_NATIVE=1` stub that lets
|
|
||||||
// the daemon boot without the addon at the cost of WebSocket I/O; the qq-hook
|
|
||||||
// path is independent and unaffected.
|
|
||||||
const missingNatives = nativeFiles.filter(
|
const missingNatives = nativeFiles.filter(
|
||||||
(f) => !fs.existsSync(path.join(nativeDir, f)),
|
(f) => !fs.existsSync(path.join(nativeDir, f)),
|
||||||
);
|
);
|
||||||
@@ -85,15 +77,10 @@ if (!fs.existsSync(path.join(ffmpegSrcDir, ffmpegAddonFile))) {
|
|||||||
missingNatives.push(`ffmpeg/${ffmpegAddonFile}`);
|
missingNatives.push(`ffmpeg/${ffmpegAddonFile}`);
|
||||||
}
|
}
|
||||||
if (missingNatives.length > 0) {
|
if (missingNatives.length > 0) {
|
||||||
const detail = `Missing native binaries for target ${targetTriple}:\n` +
|
throw new Error(
|
||||||
missingNatives.map((f) => ` - ${path.join(nativeDir, f)}`).join('\n');
|
`Missing native binaries for target ${targetTriple}:\n` +
|
||||||
if (process.env.SNOWLUMA_BUILD_SKIP_NATIVES === '1') {
|
missingNatives.map((f) => ` - ${path.join(nativeDir, f)}`).join('\n'),
|
||||||
console.warn(`[vite.config] ${detail}\n` +
|
);
|
||||||
` (continuing because SNOWLUMA_BUILD_SKIP_NATIVES=1 — runtime needs ` +
|
|
||||||
`SNOWLUMA_DEV_NO_NATIVE=1 to skip the missing addon at boot)`);
|
|
||||||
} else {
|
|
||||||
throw new Error(detail);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Legal docs are served by the WebUI consent gate; a missing one would silently
|
// Legal docs are served by the WebUI consent gate; a missing one would silently
|
||||||
|
|||||||
BIN
Binary file not shown.
Reference in new issue
Block a user