Open catethos opened 12 months ago
How would you like to use this with JavaScript? Are you wanting to run it in the browser?
Rust WasmBindgen has an external stack of JavaScript objects, and then an integer index into that stack is passed within WebAssembly. They describe their approach as “shoehorning JS objects into a u32 for wasm to use”. https://rustwasm.github.io/wasm-bindgen/contributing/design/js-objects-in-rust.html
Currently Orb doesn’t generate any helper JavaScript but it may do in the future. If you can describe your use case this can inform that potential effort.
I want to write more Elixir code but my current environment is not supporting it. So I am thinking compiling Elixir code into WASM and run it as some kind of micro service in the server side
What sort of Elixir code would you want to run — what tasks is it doing?
is there a way to write a webassembly function that takes arbitrary javascript object? Rust seem to provide a jsObject type for this purpose