onnxsim WebAssembly demo

onnxsim running for real inside Pyodide, in your browser -- full simplify() included.

Scope note: "Full pipeline" below runs the real onnxsim.simplify(), installing the real onnx PyPI package via micropip the first time you use it (a ~15MB one-time download of onnx/numpy/protobuf). "Native pass" runs one of onnxsim's own quantization/precision-conversion passes directly via the compiled onnxsim_cpp2py_export extension -- these work on raw ONNX bytes using onnxsim's statically-linked onnx copy, need no extra download, and are faster if that's all you need.
Why full simplify() needed a toolchain fix to work at all
PyPI's only onnx wasm wheel is tagged for Pyodide ABI epoch pyemscripten_2025_0. This page used to load Pyodide 314.0.5 (epoch 2026_0), so micropip.install("onnx") failed outright:
ValueError: Wheel was built with Emscripten vpyemscripten.2025.0 but Pyodide was built with Emscripten v5.0.3
Fixed by building onnxsim's own extension against Pyodide 0.29.4 instead (same epoch as onnx's wheel) -- see docs/wasm_pyodide.md's "The ABI epoch mismatch" section for the full investigation.

1. Load Pyodide + onnxsim extension

idle -- click "Load runtime" to begin (this fetches Pyodide from a CDN and can take 20-60s the first time)