Idea · Jul 30, 2026
WASM Performance Lab
A web-based assignment platform where students implement the same algorithm in JavaScript and Rust, compile Rust to WebAssembly in a sandboxed server, and see live benchmark comparisons across execution time, memory, and binary size.
What it would do
WebAssembly is a first-class web technology in 2026, yet few undergraduate courses give students hands-on experience with its performance tradeoffs. WASM Performance Lab is an assignment scaffold and evaluation platform: students open a split-pane editor with JavaScript on the left and Rust on the right, implement an assigned algorithm (sorting, image convolution, prime sieve), and click Benchmark. The server compiles the Rust code via a containerized Wasmtime pipeline, returns a WASM binary, and runs both implementations under a micro-benchmark harness in the browser. A visual report displays execution time with confidence intervals, memory usage, and binary size side by side. Students iterate on optimizations (SIMD hints, zero-copy buffers, avoiding allocations) and submit a reflection alongside their best benchmark run. Instructors see all student results on an aggregated leaderboard with optional anonymization.
Key features
- Split Monaco editor: JavaScript on the left, Rust on the right with syntax highlighting and error squiggles
- Server-side Rust-to-WASM compilation in a sandboxed Docker container (Wasmtime)
- In-browser micro-benchmark harness with 50-run statistics and confidence interval visualization
- Visual comparison report: execution time, memory (performance.measureUserAgentSpecificMemory), binary size
- Instructor leaderboard and submission portal with anonymization toggle and CSV export
- Starter assignment templates for sorting, image convolution, and numeric computation