Can Julia execute WASM IR

There are plenty of comments about converting the entire Julia process into a WASM process, but is there any way to load and execute WASM IR in a julia environment.
I’m looking to develop a function in Rust, convert to wasm IR. Then use this function in Julia. Seems like it should be do-able.

4 Likes

I think you’d need a whole WASI runtime and implement an Embedder for Julia. Not impossible, but not trivial. Probably easier to target LLVM IR and then use Julia’s inline LLVM to call it? Or easier yet to just compile a binary with a C header and use @ccall?

1 Like

Here’s one option: GitHub - Pangoraw/Wasmtime.jl: 🏃‍♀️🏃‍♂️ ⏳ A Julia wrapper for wasmtime

Here’s another option: GitHub - sunoru/NodeCall.jl: Call NodeJS from Julia.

4 Likes