Skip to content

Migrate from NAN -> NAPI #281

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

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft

Migrate from NAN -> NAPI #281

wants to merge 14 commits into from

Conversation

cowboyd
Copy link

@cowboyd cowboyd commented Mar 27, 2025

What

N-API is a forward ABI compatible API that is supported by Node, Deno, and Bun. By using N-API instead of NAN, @confluent/kafka-javascript will be able to run on all those runtimes as well as any other runtime that comes along that supports N-API.

Checklist

  • Contains customer facing changes? Including API/behavior changes
  • Did you add sufficient unit test and/or integration test coverage for this PR?
    • If not, please explain why it is not required

References

JIRA:

Test & Review

Open questions / Follow-ups

Sorry, something went wrong.

cowboyd added 14 commits March 24, 2025 20:18

Verified

This commit was signed with the committer’s verified signature.
cowboyd Charles Lowell

Verified

This commit was signed with the committer’s verified signature.
cowboyd Charles Lowell

Verified

This commit was signed with the committer’s verified signature.
cowboyd Charles Lowell

Verified

This commit was signed with the committer’s verified signature.
cowboyd Charles Lowell

Verified

This commit was signed with the committer’s verified signature.
cowboyd Charles Lowell

Verified

This commit was signed with the committer’s verified signature.
cowboyd Charles Lowell

Verified

This commit was signed with the committer’s verified signature.
cowboyd Charles Lowell

Verified

This commit was signed with the committer’s verified signature.
cowboyd Charles Lowell

Verified

This commit was signed with the committer’s verified signature.
cowboyd Charles Lowell

Verified

This commit was signed with the committer’s verified signature.
cowboyd Charles Lowell

Verified

This commit was signed with the committer’s verified signature.
cowboyd Charles Lowell

Verified

This commit was signed with the committer’s verified signature.
cowboyd Charles Lowell

Verified

This commit was signed with the committer’s verified signature.
cowboyd Charles Lowell

Verified

This commit was signed with the committer’s verified signature.
cowboyd Charles Lowell
@milindl
Copy link
Contributor

milindl commented Apr 1, 2025

Hey @cowboyd, thanks for the PR!
I've not tested it yet, but eventually replacing NAN with N-API makes sense. We'll probably do this with a major version release though, not immediately, I'll discuss this internally.

@cowboyd
Copy link
Author

cowboyd commented Apr 2, 2025

@milindl Thanks! I'm sure that it's broken in a number of ways, but my goal was to get most of the grunt work out of the way. I'd be happy to help you all push further with this as I think it would be killer to get this working on Deno and Bun.

Let me know!

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.

None yet

2 participants