Rapier
A set of 2D and 3D physics engines written in Rust by Dimforge, for games, animation and robotics. Part of Open-source motion studio: 20 repos.
Checked 2026-10-27 against the GitHub repository, its README, and the npm or PyPI registry where relevant.
| Runtime | Native Rust, or WebAssembly in browsers and Node.js. CPU. |
| How an agent drives it | Library API; stepped explicitly. Rapier documents a deterministic mode in its user guide, so results repeat across runs on the same platform; check the guide for the exact conditions. |
| License | Apache-2.0. |
| Maintenance | No GitHub releases are published; npm packages 0.21.0 on 2026-09-25; repo pushed 2026-10-10; not archived. |
What it gives you
- Crates
rapier2d,rapier3d,rapier2d-f64andrapier3d-f64; the README lists Rust, C and JavaScript variants with examples. - JavaScript use is through the WebAssembly packages
@dimforge/rapier2dand@dimforge/rapier3d(npm 0.21.0, published 2026-09-25).
Key differentiator
3D physics (and 2D) with a Rust core and a WASM build that runs in the browser; written with robotics and games in mind and described as forever free and open source. Source: README.
Pick something else when
Matter.js or Planck.js for lightweight 2D. Jolt (MIT) for a high-performance C++ engine, cannon-es (MIT, last pushed 2024-01) or Ammo.js for simple 3D in JavaScript. See the physics comparison.
Agent fit
Moderate. Physics results can be baked to keyframes by a script and replayed in a renderer; a script-to-MP4 pipeline rarely needs a live engine.
Overlap with the rest of the stack
3D counterpart to Matter.js; pairs with Three.js for drawing.