-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add official bun binding #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Performance Report✔️ no performance regression detected Full benchmark results
|
This reverts commit e864fb6.
bun/src/binding.ts
Outdated
}; | ||
|
||
// Load the compiled Zig shared library | ||
const lib = await openLibrary(path.resolve("../bun"), fns); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the path.resolve("../bun")
is strange here. I don't think it will work when the cwd is another consumer of this package.
maybe better is path.join(import.meta.dirname, '..')
(I'm assuming the dylib would be located at something like bun/libstate-transition-utils.dylib
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I simplified it to const lib = await openLibrary(path.resolve("."), fns);
please have a look at the latest change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@twoeths check this comment. Try something with import.meta.dirname here instead of path.resolve/cwd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, just switched to "import.meta.dirname"
3c6482f
to
6c060fc
Compare
2bc92dd
to
f28257c
Compare
714a29b
to
d848013
Compare
the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Motivation
Description
TODOs
bun run build
bun test:unit
bun benchmark
bun prePublish
. ==> tested in feat: prepublish step in workflow #11bun publish