In JS I'm changing two values, let's say x and y. I will send these values to Rust. Right now I'm given them as parameters to an imported Rust function (from WASM in JS). When I change x and y, I will need to call the function again to give Rust these values.
Is there a way for Rust and JS to access the WASM memory directly, so I change x and y in JS and Rust can easily acces and read/use them 'instantly'?
Most importantly, how do I implement this "with wasm-pack (
So, I don't know how to acces the wasm linear memory? in JS and Rust.