build(11.3): ship the native-embed addon in release builds (packaging tail)#84
Merged
Conversation
… tail) Makes semantic search (11.3) release-shippable. The embedding addon is statically linked (ort/ONNX Runtime baked into the 40 MB .node — otool shows no libonnxruntime; the runtime probe needs no sibling dylib), so it ships exactly like the crypto .node: no separate ONNX Runtime dylib, no runtime lib-path. - release.yml: build @brainstorm/native-embed per-runner alongside the crypto addon (same napi target scripts — the arm64 mac runner cross-builds darwin-x64, win/linux build natively). Release-only: ci.yml/verify still skip it (opt-in; the shell degrades to lexical-only where the .node is absent), so test CI stays fast. - shell package.json extraResources: ship brainstorm-embed.<platform>.node for mac/win/linux into resourcesPath/native/, matching the packaged-resolver's shortnames (darwin-arm64 / win32-x64-msvc / linux-x64-gnu). The build-generated .node/index.js/index.d.ts stay gitignored + files-excluded (from #79). Cross-platform build proven only on host darwin-arm64 here; the full matrix is verified by a release.yml workflow_dispatch dry-run (no publish). Deferred: first-run-download progress UX (the download works headless today). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes semantic search (11.3) release-shippable — the last piece of the embedding work.
Turned out simple: the addon is self-contained
Investigated
ort's linking: ONNX Runtime is statically linked into the addon —otool -L brainstorm-embed.darwin-arm64.nodeshows only system libs (nolibonnxruntime), the.nodeis 40 MB (ORT baked in), and the runtime probe works with zero sibling files. So it ships exactly like the crypto.node: no separate ONNX Runtime dylib, no runtime lib-path config.Changes
release.yml: build@brainstorm/native-embedper-runner alongside the crypto addon (samenapitarget scripts — the arm64 mac runner cross-builds darwin-x64; win/linux build natively). Release-only —ci.yml/verifystill skip it (opt-in; the shell degrades to lexical-only where the.nodeis absent), so test CI stays fast.shell package.jsonextraResources: shipbrainstorm-embed.<platform>.nodeintoresourcesPath/native/for mac/win/linux, matching the packaged-resolver's shortnames.The generated
.node/index.js/index.d.tsstay gitignored + files-excluded (from #79).Verification
Proven on host darwin-arm64 (build + static-link + runtime embed). The cross-platform build (esp. the new⚠️ I can't trigger that from here (guarded as a deploy action); see the PR discussion for the one-line command.
ortcompile on all 6 targets + the darwin-x64 cross-build) is verified by arelease.ymlworkflow_dispatchdry-run —publish=never, builds the full matrix, creates no release.Deferred: first-run-download progress UX (the ~130 MB model download works headless today; a progress bar is polish).
🤖 Generated with Claude Code