Skip to content
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

Support for BunJS? #153

Open
ArthurTimofey opened this issue Jul 19, 2024 · 6 comments
Open

Support for BunJS? #153

ArthurTimofey opened this issue Jul 19, 2024 · 6 comments
Assignees
Labels
WIP Work In Progress

Comments

@ArthurTimofey
Copy link

ArthurTimofey commented Jul 19, 2024

Hey,

I'm wondering if there is a potential way to support BunJS?

As for now I am running in to the following issue with regards to Node API:

TypeError: symbol 'napi_register_module_v1' not found in native module. Is this a Node API (napi) module?

The API napi_register_module_v1 is supported in BunJS but it seems like it still does not work for me. Been trying to hack it too with no progress but any suggestions very much welcome.

For reference I have also asked bun about this issue here.

As a work around I have been building .mjs scripts and piping back the result to Bun. Which as you can imagine is super cumbersome.

@UrielCh
Copy link
Owner

UrielCh commented Jul 20, 2024

Nope, this OpenCV4nodeJS is built on top of the previous Node native API. I tried to build a new one from scratch using the modern N-API and mapping the same binary as the official Python OpenCV API, but it took me more time than I can allocate to it.

See: https://github.com/UrielCh/opencv-sandbox

I have converted some common Python binding calls to N-API, and I think the project needs four more months to complete.

@ArthurTimofey
Copy link
Author

Ah I see, well that's a shame but completely understandable.

Ill see if I can use the sandbox to try and use the functionality I need or even contribute to it.

Thanks for the great work anyways.

@UrielCh
Copy link
Owner

UrielCh commented Sep 4, 2024

I finally change my mind and start to migrate the project to N-API so I will be able to use it with Deno and BunJS.

@UrielCh UrielCh added the WIP Work In Progress label Sep 4, 2024
@UrielCh UrielCh self-assigned this Sep 13, 2024
@stoefln
Copy link

stoefln commented Oct 17, 2024

@UrielCh how is it going? Is there something I can help with?

@UrielCh
Copy link
Owner

UrielCh commented Oct 18, 2024

I have updated the project node-addon-examples to improve the N-API samples (4 PR opened), but the maintainers don't seem very interested in my proposal.

The active branch for this migration is:
napi-1.
I have cleaned up the test folder to add features back one by one.

Currently, I need to focus on finding a full-time job, so I have little time to dedicate to this project.

@stoefln
Copy link

stoefln commented Oct 18, 2024

I have updated the project node-addon-examples to improve the N-API samples

Hmm. How is this related to opencv4nodejs n-api migration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work In Progress
Projects
None yet
Development

No branches or pull requests

3 participants