4 ms·
NAPI-RS is another option to Neon. It’s faster and has a new feature in beta that automatically does the type wrapping for you.
by vaughan 5y ago
NAPI-RS is another option to Neon. It’s faster and has a new feature in beta that automatically does the type wrapping for you.
- skwee357 5y agoThanks for the suggestion! NAPI-RS does look cleaner than Neon. I wonder what's the difference though. Do you know maybe? It looks like NAPI-RS Docs does not list any meaningful differences.
- dceddia 5y agoI’ve been using NAPI-RS and I like it a lot so far. The feature that caused me to switch was callbacks - specifically, I wanted to pass a JS callback to Rust, and have Rust call it repeatedly. I couldn’t figure out how to do that with Neon, but Napi has support and docs for it. One difference is that NAPI-RS uses Node’s N-API for calling Node, and Neon has a mix of N-API and v8 backends. I’m not sure if this is the main reason behind the speed difference or not.