Hi Erin and team,
Just wanted to share that we've completed a pure Rust port of Box2D v3: box2d-rust.
A few notes on the approach:
- It's a strict behavioral port of the pinned v3.1.1 source (
56edae7) — same algorithms, same f32 arithmetic, no reordered floating-point operations.
- The hand-rolled
b2Atan2 / b2ComputeCosSin were ported bit-for-bit, and the FallingHinges determinism test produces bit-identical results against the C build.
- The C test suite was ported alongside the code — 129 tests, green in both standard and
BOX2D_DOUBLE_PRECISION (large world) modes.
- Not ported by design: the threading/task system (the port is serial), the global world registry, and the arena allocator (replaced with Rust
Vec-indexed pools).
Thank you for Box2D and for keeping the C source so readable and well-commented — Erin's explanatory comments made an exact port feasible, and we preserved them throughout. MIT licensed, credit to the original throughout.
Feel free to close this issue — it's just an FYI/thank-you. Happy to add a link wherever it's useful, or answer any questions.
— Lars Brubaker
Hi Erin and team,
Just wanted to share that we've completed a pure Rust port of Box2D v3: box2d-rust.
A few notes on the approach:
56edae7) — same algorithms, samef32arithmetic, no reordered floating-point operations.b2Atan2/b2ComputeCosSinwere ported bit-for-bit, and the FallingHinges determinism test produces bit-identical results against the C build.BOX2D_DOUBLE_PRECISION(large world) modes.Vec-indexed pools).Thank you for Box2D and for keeping the C source so readable and well-commented — Erin's explanatory comments made an exact port feasible, and we preserved them throughout. MIT licensed, credit to the original throughout.
Feel free to close this issue — it's just an FYI/thank-you. Happy to add a link wherever it's useful, or answer any questions.
— Lars Brubaker