4 ms·
I've been using NAPI-RS to bridge from Electron <-> Rust and it's been nice - https://napi.rs/ https://napi.rs/ I believe SWC uses it behind the scenes. They j
by dceddia 5y ago
I've been using NAPI-RS to bridge from Electron <-> Rust and it's been nice - https://napi.rs/ https://napi.rs/ I believe SWC uses it behind the scenes.
They just put out an alpha release that makes it way more ergonomic to write Rust functions that interop with JS, too. There's a small example of it in the README: https://github.com/napi-rs/napi-rs#taste https://github.com/napi-rs/napi-rs#taste
NAPI isn't as well-known in the JS-to-Rust bindings world (Neon is the more well-known library, https://neon-bindings.com/ https://neon-bindings.com/) but it seems to be gaining steam.
- leerob 5y agoAh yes, how could I forget! NAPI-RS is very, very slick.