takahirox / nes-rust

NES emulator written in Rust + WASM
MIT License
208 stars 24 forks source link

Optimize JS-WASM data transfer and API #37

Open takahirox opened 4 years ago

takahirox commented 4 years ago

We should optimize JS-WASM data transfer and API. Currently pixel data and audio sample buffer are copied twice each. One in WASM side and another onc in JS side.

takahirox commented 4 years ago

Optimized. Buffers are copied once.

If I could dynamically share buffer between WASM and JS, no copy is needed.