# Julia and WASM

**URL:** <https://discourse.julialang.org/t/julia-and-wasm/108482>\
**Category:** General Usage\
**Tags:** wasm\
**Created:** [January 7, 2024, 11:08pm UTC](https://discourse.julialang.org/t/julia-and-wasm/108482 "2024-01-07T23:08:40Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [September 9, 2024, 1:45am UTC](https://discourse.julialang.org/t/julia-and-wasm/108482/11 "2024-09-09T01:45:20Z")

</div>

> [@Palli](#):
>
> AOT compilation is however coming with upcoming `juliac`

Worth mentioning the proprietary AOT compiler [SyslabCC](https://discourse.julialang.org/t/syslabcc-suzhou-tongyuans-proprietary-julia-aot-compiler-is-now-available-for-free-use-personal-educational-license-only/114633), which answers the question of possibility and helps explains some of the limitations that trimmed executables must have. The type stability requirement in particular is important for limiting executable size; 11:11 of the talk introducing the [development of juliac](https://youtu.be/MKdobiCKSu0) explains that dynamic dispatches with few enough options could be feasible, but otherwise supporting too many runtime branches requires too much AOT-compilation. In fact, JIT compilation is usually more efficient by compiling anything that is called in a session, not everything that could be. An AOT compiler can support dynamic features like JIT compilation, but it also needs the memory and runtime overheads, as PackageCompiler.jl and JuliaScript.jl demonstrate.

> [@SKavuri](#):
>
> AOT as parameter to julia REPL

AOT-only compilation is not a desirable setting for a REPL or any interactive shell. Any new code you write can’t be compiled interactively and at best gets interpreted a la default Debugger.jl, which is slow. Interactive work requires metadata like module namespaces and method tables, which you would want to trim out for minimal executables; 9:36 of the juliac talk explains limitations that comes with trimming. An AOT-only REPL would have less overhead, but it’s still too much for the small executable crowd, and everyone else has better options. We already AOT-compile code per package, which unlike other AOT compilation approaches mentioned so far has the necessary conditions to import them interactively in a REPL.

---

_[View the full topic](https://discourse.julialang.org/t/julia-and-wasm/108482)._
