Skip to content

build(11.3): ship the native-embed addon in release builds (packaging tail)#84

Merged
th3-br41n merged 1 commit into
mainfrom
feat/embed-packaging
Jul 3, 2026
Merged

build(11.3): ship the native-embed addon in release builds (packaging tail)#84
th3-br41n merged 1 commit into
mainfrom
feat/embed-packaging

Conversation

@th3-br41n

Copy link
Copy Markdown
Contributor

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.node shows only system libs (no libonnxruntime), the .node is 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-embed per-runner alongside the crypto addon (same napi target scripts — the arm64 mac runner cross-builds darwin-x64; win/linux build natively). Release-onlyci.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 into resourcesPath/native/ for mac/win/linux, matching the packaged-resolver's shortnames.

The generated .node/index.js/index.d.ts stay gitignored + files-excluded (from #79).

Verification

Proven on host darwin-arm64 (build + static-link + runtime embed). The cross-platform build (esp. the new ort compile on all 6 targets + the darwin-x64 cross-build) is verified by a release.yml workflow_dispatch dry-runpublish=never, builds the full matrix, creates no release. ⚠️ I can't trigger that from here (guarded as a deploy action); see the PR discussion for the one-line command.

Deferred: first-run-download progress UX (the ~130 MB model download works headless today; a progress bar is polish).

🤖 Generated with Claude Code

… 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>
@th3-br41n th3-br41n merged commit ffc6c9b into main Jul 3, 2026
2 of 3 checks passed
@th3-br41n th3-br41n deleted the feat/embed-packaging branch July 3, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant