Re:Rust is a hard way to make a web API
by hda2 on Friday January 15, 2021 @10:54PM
(#25799881)
Pardon my ignorance, but how are you using .wasm in the browser? How are getting values out of the web assembly module?
[ Parent
| on HN ]
I used wasm bindgen to make rust code callable from js.
https://rustwasm.github.io/docs/wasm-bindgen/
https://rustwasm.github.io/wasm-bindgen/api/web_sys/
Suit yourself
Re:Rust is a hard way to make a web API
by jagged-chisel on Friday January 15, 2021 @11:22PM
(#25800011)
JavaScript 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.