mujoco-wasm-forge documentation
mujoco-wasm-forge is a reproducible MuJoCo→WebAssembly toolchain that keeps the exported ABI as an explicit,
auditable contract. It builds a specific upstream MuJoCo ref into dist/<ver>/mujoco.js + dist/<ver>/mujoco.wasm,
plus ABI artifacts under dist/<ver>/abi/.
Jump to
Quickstart:
quickstartHow-to:
howto_build_versionABI contract:
reference_abi_contractBench:
benchSimulate-style demo:
mujoco-wasm-play(GitHub)
30-second summary
If you just want artifacts: use a committed
dist/<ver>/or runpython forge_cli.py build --version <mjver>.Exports are explicitly defined by
dist/<ver>/abi/exports.lstand enforced at link time.--with-checksruns smoke + quality gates (check/tests/*.mjs) against the produced dist.Maintainers can use the ABI artifacts to audit diffs when upgrading MuJoCo.
Bench: a reproducible suite that validates forge’s flexibility/variant model against performance and Simulate TTFS (
bench).
Mini glossary
Term |
Plain meaning |
|---|---|
|
A build output directory for one MuJoCo version/ref. |
|
The single source of truth for exported C symbols (fed to Emscripten |
wrapper |
|
introspect |
Header/AST-based extraction of functions/structs/enums from |
gate |
A check that fails (or warns) when ABI/exports/quality constraints are violated. |
Where to start
New users: read
quickstart, thenhowto_build_version.Integrators:
howto_web_workerandhowto_node.Maintainers:
user_guide_pipeline,reference_abi_contract, andreference_checks_gates.
User Guide
How-to
Reference