# Can Julia execute WASM IR

**URL:** <https://discourse.julialang.org/t/can-julia-execute-wasm-ir/108972>\
**Category:** Internals & Design\
**Tags:** wasm\
**Created:** [January 18, 2024, 4:21pm UTC](https://discourse.julialang.org/t/can-julia-execute-wasm-ir/108972 "2024-01-18T16:21:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glen1](https://avatars.discourse-cdn.com/v4/letter/g/ee7513/32.png) [@Glen1](https://discourse.julialang.org/u/Glen1)\
**Post date:** [January 18, 2024, 4:21pm UTC](https://discourse.julialang.org/t/can-julia-execute-wasm-ir/108972/1 "2024-01-18T16:21:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mrufsvold](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mrufsvold/32/31600_2.png) [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Post date:** [January 18, 2024, 9:08pm UTC](https://discourse.julialang.org/t/can-julia-execute-wasm-ir/108972/3 "2024-01-18T21:08:10Z")

</div>

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`?

---

<div class="post-metadata">

**Author:** ![tshort](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tshort/32/43_2.png) [@tshort](https://discourse.julialang.org/u/tshort)\
**Post date:** [January 19, 2024, 2:11am UTC](https://discourse.julialang.org/t/can-julia-execute-wasm-ir/108972/4 "2024-01-19T02:11:38Z")

</div>

Here’s one option: [GitHub - Pangoraw/Wasmtime.jl: 🏃‍♀️🏃‍♂️ ⏳ A Julia wrapper for wasmtime](https://github.com/Pangoraw/Wasmtime.jl)

Here’s another option: [GitHub - sunoru/NodeCall.jl: Call NodeJS from Julia.](https://github.com/sunoru/NodeCall.jl)
