napi-rs / website

Website for napi.rs
https://napi.rs
MIT License
21 stars 38 forks source link

Feedback for “Home – NAPI-RS” #37

Open mogill opened 2 years ago

mogill commented 2 years ago

The README has a bullet point claiming "Zero copy data interactive between Rust & Node.js". All data is copied into/out of the JS virtual machine by definition. Rust, like every other foreign interface, cannot directly access the JS heap without risking race conditions with garbage collection. This claim should be removed or corrected.

Brooooooklyn commented 2 years ago

@mogill You can access ArrayBuffer/Buffer/TypedArray without data copy, and you can create them without data copy too.

mogill commented 2 years ago

That's what the website should say. The claim as written is deceitful.