Every change re-solves the system with OrdinaryDiffEq's Tsit5 adaptive Runge–Kutta method over t ∈ [0, 40], saving a point every 0.01. The solver was compiled from Julia to WasmGC; its integrator was built in Julia ahead of time and is part of the module.
WasmCodegen collects the closed world of code the exported functions can run with Julia's own
inference, as juliac --trim=safe does, structures its control flow and emits
WebAssembly with garbage-collected structs and arrays.
The integrator (init(prob, Tsit5(); saveat = 0.01)) is built natively when the
module is compiled, then serialized into it: 148 Julia objects, its caches and
Butcher tableau included. The page sets p and u₀, then calls
reinit! and solve!.
232 KB of WebAssembly, 77 functions, no imports. Native Julia on the build machine solves the classic case in about 0.6 ms; the timing on this page is your browser's.