Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/cli/scripts/build-dist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const TARGET_NATIVE_PACKAGES: Record<Target, string[]> = {
"linux-arm64": [
"@libsql/linux-arm64-gnu",
"@parcel/watcher-linux-arm64-glibc",
"@anush008/tokenizers-linux-arm64-gnu",
],
};

Expand Down
1 change: 1 addition & 0 deletions packages/host-service/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const result = await Bun.build({
"@anush008/tokenizers",
"@anush008/tokenizers-darwin-universal",
"@anush008/tokenizers-linux-x64-gnu",
"@anush008/tokenizers-linux-arm64-gnu",
"@anush008/tokenizers-win32-x64-msvc",
],
});
Expand Down
3 changes: 3 additions & 0 deletions packages/host-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,8 @@
"bun-types": "^1.3.1",
"drizzle-kit": "0.31.8",
"typescript": "^5.9.3"
},
"optionalDependencies": {
"@anush008/tokenizers-linux-arm64-gnu": "0.6.0"
}
Comment on lines +87 to 89
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Cross-version native binding pairing

The arm64 binding is pinned at 0.6.0, while the other platform bindings (linux-x64-gnu, darwin-universal, win32-x64-msvc) all resolve to 0.0.0. The @anush008/tokenizers@0.0.0 JS loader calls require('@anush008/tokenizers-linux-arm64-gnu') without version-gating, so the 0.6.0 native binary must expose a compatible ABI — which the author verified for the current fastembed surface. If @anush008/tokenizers is ever updated and the JS-to-native boundary changes, arm64 could break silently while other platforms continue to work. Adding a comment here documenting why 0.6.0 is used instead of 0.0.0 would help future maintainers.

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/host-service/package.json
Line: 87-89

Comment:
**Cross-version native binding pairing**

The arm64 binding is pinned at `0.6.0`, while the other platform bindings (`linux-x64-gnu`, `darwin-universal`, `win32-x64-msvc`) all resolve to `0.0.0`. The `@anush008/tokenizers@0.0.0` JS loader calls `require('@anush008/tokenizers-linux-arm64-gnu')` without version-gating, so the `0.6.0` native binary must expose a compatible ABI — which the author verified for the current fastembed surface. If `@anush008/tokenizers` is ever updated and the JS-to-native boundary changes, arm64 could break silently while other platforms continue to work. Adding a comment here documenting why `0.6.0` is used instead of `0.0.0` would help future maintainers.

How can I resolve this? If you propose a fix, please make it concise.

}
Loading