3 ms·
Pardon my ignorance, but how are you using .wasm in the browser? How are getting values out of the web assembly module?
by hda2 6y ago
Pardon my ignorance, but how are you using .wasm in the browser? How are getting values out of the web assembly module?
- jagged-chisel 6y agoJavaScript is used to fetch, initialize, and run the wasm module. As long as the module exports functions, they can be called from JS. There are JS libraries that will automatically setup up bindings for you.
- ctr_ctr 6y agohttps://rustwasm.github.io/wasm-bindgen/api/web_sys/ https://rustwasm.github.io/wasm-bindgen/api/web_sys/ Suit yourself
- smolder 6y agoI used wasm bindgen to make rust code callable from js. https://rustwasm.github.io/docs/wasm-bindgen/ https://rustwasm.github.io/docs/wasm-bindgen/