Julia → JavaScript
Transpiler
Transpile Julia functions to JavaScript via typed IR. Arrays, strings, math, closures, structs — all transpile to clean, efficient JS.
using JavaScriptTarget
# Write Julia — compiles to JavaScript
function physics(x::Float64, v::Float64, dt::Float64)
a = -9.81
v_new = v + a * dt
x_new = x + v_new * dt
return (x_new, v_new)
end
# Compile to JS
result = compile(physics, (Float64, Float64, Float64))
println(result.js) # Clean JS outputTry it Live
Write Julia on the left — see transpiled JavaScript on the right. Runs entirely in your browser.
Note: This is a lightweight browser-only playground with a subset of JST's capabilities. The full JavaScriptTarget.jl package runs in Julia and supports the complete transpilation pipeline — arrays, broadcasting, structs, closures, package registry, and 50+ Julia operations. See the Getting Started guide to use the full transpiler.
Typed IR
Walks Julia's typed IR (code_typed) to generate JS. Type-driven compilation — not string hacking.
Package Registry
Register custom compilations for any Julia package. PlotlyBase, DataFrames — they just compile.
Tiny Output
No framework runtime. Each compiled function is self-contained JS. Inline-able in <script> tags.