4 ms·
The native code binding was impressively simple! 7 lines of rust, 1 small JS change. It looks like napi-rs supports Buffer so that JS change could be easily el
by tln 2y ago
The native code binding was impressively simple!
7 lines of rust, 1 small JS change. It looks like napi-rs supports Buffer so that JS change could be easily eliminated too.
- jchw 2y agoI've used napi-rs a bit ago, it's pretty awesome. That said though, the main issue is that the Rust bindings story is not always that nice. It really depends. Internally, Node modules have quite a lot of complexity, and when you try to do more interesting things you could wind up facing some of the complexity of how it is implemented.