Linus Ekenstam Builds 90KB Rust 3D Physics Engine with Gemini 4 Argon
On October 14, Linus Ekenstam posted a series of updates on 'impulse,' an ultra-lightweight physics-based 3D engine built in collaboration with Gemini 4 Argon. Written entirely in Rust from first principles with no external math, physics, or engine dependencies, it pairs with a WebGL2 renderer and runs in the browser via WebAssembly. The stated goal is the smallest, lightest physics 3D engine ever.
Confirmed
- The engine is roughly 1,200 lines of Rust; the golden-master build's entire directory is 82,713 bytes (83KB), later shown compressed to 69,632 bytes (61.5KB), with posts citing figures between 61.5KB and 90KB; modules include browser/camera/math/mesh/physics/renderer
- Tested on a MacBook Pro M5, it smoothly handles 20,000 rigid bodies and 2,000 collisions (m2 mentions 120fps)
- Early in development, problems appeared above 2,000 rigid bodies; after tuning, roughly 20,000 bodies run simultaneously and smoothly
Why it matters
The project demonstrates AI-assisted coding's capability in systems-level, performance-sensitive domains: hand-written math and physics code from scratch, with a tiny final footprint and strong performance, offering a new approach for lightweight web graphics and simulation—and a signal of Gemini 4 Argon's competence on complex engineering tasks.
2026-10-14 ~ 2026-10-14 · 6 related posts
Primary sources
- Rust 3D physics engine built with Gemini Argon: 20k bodies in 90KB — LinusEkenstam ·
- 90KB Rust Physics Engine Now Handles 20,000 Bodies with 2,000 Collisions — LinusEkenstam ·
- An Entire Rust 3D Engine in 82,713 Bytes, Build Verified — LinusEkenstam · 2026-10-14
- [source] Rust 3D physics engine built with Gemini Argon: 20k bodies in 90KB — LinusEkenstam · 2026-10-14
- [source] 90KB Rust Physics Engine Now Handles 20,000 Bodies with 2,000 Collisions — LinusEkenstam · 2026-10-14
3 near-duplicate retellings: LinusEkenstam · LinusEkenstam · LinusEkenstam