oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.12k stars 2.76k forks source link

Implement `node_register_module` and some `V8::` APIs #3110

Open Jarred-Sumner opened 1 year ago

Jarred-Sumner commented 1 year ago

This is blocking:

These (and others like uWebSocket.js) use the V8 APIs instead of the cross-runtime n-api (which bun already implement)

We can probably look at node-jsc to see how to do this.

chriskrogh commented 8 months ago

@Jarred-Sumner @colinhacks would it be possible for @faire to put a bounty on this? node-canvas is the last holdout for us adopting bun install in our frontend monorepo. bun would save us a lot of time in local dev & CI. https://github.com/oven-sh/bun/issues/5835#issuecomment-1943009418

(some of our testing deps link node_canvas: mocha, jsdom, jest-environment-jsdom)

7f8ddd commented 8 months ago

@Jarred-Sumner @colinhacks would it be possible for @Faire to put a bounty on this? node-canvas is the last holdout for us adopting bun install in our frontend monorepo. bun would save us a lot of time in local dev & CI. #5835 (comment)

node-canvas already has an NAPI port, you just need to build the latest from the git. Alternatively, you can use https://github.com/Brooooooklyn/canvas, which is faster and has basically the same API.

chriskrogh commented 8 months ago

node-canvas already has an NAPI port, you just need to build the latest from the git. Alternatively, you can use https://github.com/Brooooooklyn/canvas, which is faster and has basically the same API.

we don't depend on canvas ourselves. some of our dependencies try to link it during the installation process (mocha, jsdom, jest-environment-jsdom, ...) is there a way to get these dependencies to use the NAPI version?

AdamSchinzel commented 7 months ago

Any updates when we can expect this to land?

gerardmarquinarubio commented 6 months ago

node-canvas already has an NAPI port, you just need to build the latest from the git. Alternatively, you can use https://github.com/Brooooooklyn/canvas, which is faster and has basically the same API.

we don't depend on canvas ourselves. some of our dependencies try to link it during the installation process (mocha, jsdom, jest-environment-jsdom, ...) is there a way to get these dependencies to use the NAPI version?

@chriskrogh Yes if you are willing to do some messy postinstall scripting, would be much easier if bun supported some nested overriding but that is also not in the roadmap afaik.

chriskrogh commented 5 months ago

@Jarred-Sumner gentle bump here. seems like both this issue (and related ones https://github.com/oven-sh/bun/issues/5835) have been racking up reactions. any plans on adding this to bun sometime soon?

aidendotgg commented 4 months ago

Please 🙏🏻

7f8ddd commented 4 months ago

@Jarred-Sumner gentle bump here. seems like both this issue (and related ones #5835) have been racking up reactions. any plans on adding this to bun sometime soon?

node-canvas literally works fine. instead of telling Bun to update, tell those mfs to publish a release, because they haven't done that in forever.