-
Notifications
You must be signed in to change notification settings - Fork 287
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
New Node.js NAPI #202
Comments
It should be noted that it's feature flagged for now, but I'd definitely say it's worth looking into since it'll be a stable target soon and can be used in pure C, so neon could make better use of Rust FFI rather than having to maintain neon.cc. 😸 |
It was released with Node 8.0.0 yesterday :D |
Released, but behind a --napi-modules flag. |
@Qard Doesn't prevent from playing it (with using cfg(feature) for conditional compilation on Neon side). |
Yep, just wanted to be clear it's still behind a flag, so not production-ready yet, and could change at any time. |
I agree this is something we should eventually support, and I'd welcome experimentation! We can't switch to it overnight, but if NAPI pans out I would absolutely support switching to it when the time is right. |
N-API is no longer flagged as of Node.js 8.6.0, by the way. 🎉 |
@Qard Nice! It's still marked as experimental and I don't really know how much it's likely to change in practice. It looks like 8.x will become LTS in a few weeks if I'm reading the schedule right, so we could technically switch to that soon. But it's still pretty new so I think it doesn't hurt to give it some time. Anyway, none of that precludes us experimenting with this! I don't think it's the best use of my time right now, since we have bigger issues to fix (especially the safety holes, the high level macro syntax, and fleshing out the API) first. But if anyone is interested in working on this I will be happy to discuss it with them and actively mentor them. |
I could try to start implementing this after the next week unless someone wants to do it earlier. |
I would definitely not mark this as beginner friendly, looks like it won't be that easy to preserve API compatibility without hacks. |
@RReverser Any update on this issue. |
napi is considered stable at this point: nodejs/node@cd7d7b1 |
I did look at extending Neon back in the day, but it seemed relying on V8 implementation details too much to have both implementations for V8 and NAPI. Now that NAPI is stable, full rewrite to get away from V8 API should be likely easier. |
any word on this? |
There are plans for this but it will likely be a while support for it gets added. The main focus as of now is to improve the existing API and DX |
Duplicate of #444 |
Now that Node.js has brought support for a native API, ABI-compatible across future Node.js versions or even different Node.js engines, are there any plans to use it instead of direct V8 API for Neon's bindings?
It looks like it could benefit the project, although unclear if it covers all the functionality Neon requires yet.
The text was updated successfully, but these errors were encountered: