Charlotte's WebAssembly backend currently supports simple numerical kernels, and could be productively used as a sort of scripting language over WASM.
julia> relu(x) = ifelse(x < 0, 0, x) relu (generic function with 1 method) julia> @code_wasm relu(1) (func (param i64) (result i64) (i64.const 0) (get_local 0) (get_local 0) (i64.const 0) (i64.lt_s) (select) (return))
Julia code secretly comes in two dialects:
In early prototypes the difference between the dialects will be fairly stark; the dynamic subset is essentially a syntax layer over JS, while the static subset only supports basic numerics. As more features are added both should converge to standard Julia, and the difference will become seamless for most users.
See here for a more detailed outline of the static compile pipeline.
3 days ago