Physics simulation has lived in C, C++, and Fortran for forty years. Today it gets a pure-Rust home — rigid bodies, fluids, molecules, and structures, all under one roof.
Today we released OxiPhysics 0.1.0 — the first public release of a unified, pure-Rust physics engine that targets the same problem domains as four separate native incumbents at once: Bullet (rigid-body dynamics), OpenFOAM (computational fluid dynamics), LAMMPS (molecular dynamics), and CalculiX (finite-element analysis).
No C. No C++. No Fortran. No libbullet, no MPI cluster setup just to run a solver, no Fortran build chain inherited from the 1990s. No unsafe surprises hiding in a contact solver. OxiPhysics compiles to a single static binary (or to wasm32 for the browser) and runs everywhere with one cargo add — and every public item ships with enforced Rustdoc.
Why OxiPhysics 0.1.0 matters
For decades, anyone doing serious simulation has had to assemble a toolbox: Bullet for game physics, OpenFOAM for fluids, LAMMPS for molecular dynamics, CalculiX or Abaqus for structures. Each is excellent, and each comes with its own build system, its own file formats, its own memory model, and its own C/C++/Fortran toolchain to babysit. Gluing them together — passing a deformed mesh from an FEM solve into a fluid domain, or coupling rigid bodies to a particle fluid — usually means writing fragile interop code across language and process boundaries.
OxiPhysics takes a different path: one workspace, one type system, one memory-safe language, covering all of those domains. This first release is deliberately broad — the goal was a complete, end-to-end physics stack, not a thin demo. The numbers from the release itself tell the story:
- 17 crates spanning core math, geometry, collision, rigid bodies, constraints, vehicles, SPH and LBM fluids, FEM, molecular dynamics, soft body, materials, GPU/compute, visualization, and I/O.
- ~60,189 tests across the workspace, all passing under
cargo nextest. - Zero stubs — no
todo!()orunimplemented!()calls anywhere in the workspace. - Pure Rust — zero C/Fortran build-time dependencies; default features are 100% Rust.
- Strict docs —
RUSTDOCFLAGS='-D warnings' cargo docpasses with no missing-docs warnings, andcargo publish --dry-runpasses for the top-leveloxiphysicscrate.
These are early-alpha crates — but they are real, tested, and honest. Where a method exists, it computes a real result.
Technical Deep Dive: How OxiPhysics is built
The 17 crates are organized as a layered workspace: a numeric core at the bottom, domain solvers in the middle, and platform bindings on top. You depend only on the layers you need.
-
Core, geometry & collision (
oxiphysics-core,oxiphysics-geometry,oxiphysics-collision) The core provides the foundational types —Vec3,Quat,Mat3,Transform,AABB— plus ODE integrators (RK4, Dormand-Prince, Rosenbrock), stochastic processes, signal processing (FFT, wavelets, filtering), tensors, sparse linear algebra, interval arithmetic, automatic differentiation, and optimization (BFGS, NLP, convex).oxiphysics-geometryadds shapes (sphere, box, capsule, cylinder, convex hull, triangle mesh), NURBS surfaces and curves, CSG Boolean operations, mesh repair, and computational geometry (Delaunay, Voronoi, convex hull).oxiphysics-collisionis the Bullet-shaped narrow/broad phase: GJK + EPA, sweep-and-prune, BVH (AABB tree), continuous collision detection, ray/segment casting, and contact-manifold generation. -
Rigid bodies, constraints & vehicles (
oxiphysics-rigid,oxiphysics-constraints,oxiphysics-vehicle) RK4 and symplectic integrators, inertia-tensor computation, island detection and sleeping, plus domain extensions for aerospace (attitude control, orbital mechanics), spacecraft, marine hydrodynamics, and swarm robotics. The constraint layer brings PGS and TGS iterative solvers with hinge, ball-socket, slider, fixed, and prismatic joints, motors, trajectory optimisation, and warm starting. The vehicle crate models Pacejka magic-formula tires, suspension kinematics, multi-gear drivetrains, electric-vehicle powertrains, and an autonomous-driving plant model. -
Continuum & particle solvers (
oxiphysics-sph,oxiphysics-lbm,oxiphysics-fem,oxiphysics-md,oxiphysics-softbody,oxiphysics-materials) This is where OpenFOAM, LAMMPS, and CalculiX get their pure-Rust answer. SPH ships WCSPH, IISPH, DFSPH, and PCISPH with free-surface tracking and multiphase support; LBM ships D3Q19/D3Q27 lattices with SRT/MRT/TRT collision, Smagorinsky turbulence, biofluid, MHD, and traffic flow; FEM covers linear and nonlinear (hyperelastic, elasto-plastic) analysis, XFEM crack propagation, spectral elements, stochastic FEM, and CalculiX-compatible I/O. MD provides Lennard-Jones, Buckingham, Morse, and custom potentials, ReaxFF, QM/MM coupling, REMD, and free-energy perturbation, with LAMMPS and AMBER file compatibility. Soft body adds PBD/XPBD, cloth with self-collision, hair, Cosserat rods, and surgical simulation, and the materials crate carries hyperelastic (Neo-Hookean, Mooney-Rivlin, Ogden), elasto-plastic (von Mises, Drucker-Prager), composites, biomaterials, and smart materials. -
Compute, visualization, I/O & bindings (
oxiphysics-gpu,oxiphysics-viz,oxiphysics-io,oxiphysics-python,oxiphysics-wasm) A CPU-fallback work-stealing compute backend with parallel radix sort and a particle-system pipeline (ready for future on-device GPU back-ends); a CPU software renderer with Phong/PBR shading, Marching-Cubes isosurfaces, volume rendering, and scientific plotting; and an I/O layer that reads and writes VTK, PDB/mmCIF, LAMMPS dump, OpenFOAM, GLTF 2.0, and HDF5 across 80+ format modules. In 0.1.0 the Python and WASM crates expose a JSON/serde bridge API (the native PyO3 and wasm-bindgen FFI layers land in a later release).
Throughout, the Rust advantages run end to end: guaranteed memory safety, fearless concurrency, trivial cross-compilation, and rich typed Result returns instead of C error codes and segfaults.
Getting Started
cargo add oxiphysics
The top-level oxiphysics crate re-exports every domain module, so you can start from a single import:
use oxiphysics::core::math::Vec3;
use oxiphysics::core::Transform;
// Build a transform at a given position
let origin = Transform::default();
let offset = Vec3::new(1.0, 2.0, 3.0);
// Transform a point from local space into world space
let world_pt = origin.transform_point(&offset);
println!("world: {:?}", world_pt);
Prefer a smaller build graph? Depend on just the sub-crates you need instead:
[dependencies]
oxiphysics-core = "0.1.0"
oxiphysics-collision = "0.1.0"
oxiphysics-rigid = "0.1.0"
What’s inside
This is the debut release — a complete, four-domain physics stack in pure Rust. Highlights from the 0.1.0 changelog:
oxiphysics-core— math primitives, ODE/numerical solvers, statistics, and Bayesian optimization that the rest of the engine builds on.oxiphysics-geometry— B-splines and NURBS, mesh geometry, CSG Booleans, and computational-geometry algorithms.oxiphysics-collision— broad-phase sweep-and-prune plus narrow-phase EPA/GJK, BVH, CCD, and contact graphs.oxiphysics-rigid/oxiphysics-constraints/oxiphysics-vehicle— rigid-body dynamics, kinematics, and mechanism simulation; PGS/TGS constraint and joint solvers with robot control; and full vehicle dynamics.oxiphysics-sph/oxiphysics-lbm— Smoothed Particle Hydrodynamics and Lattice Boltzmann fluid solvers, the pure-Rust answer to OpenFOAM-class CFD.oxiphysics-fem— linear and nonlinear finite-element structural analysis, the CalculiX-shaped layer.oxiphysics-md— molecular dynamics with reactive force fields and QM/MM, the LAMMPS-shaped layer.oxiphysics-softbody/oxiphysics-materials— soft-body dynamics, crack propagation, and bio-mechanics, plus a broad material-model and smart-material library.oxiphysics-gpu/oxiphysics-viz/oxiphysics-io— a compute backend, a software renderer, and I/O for VTK, OpenFOAM, HDF5, medical imaging, and more.oxiphysics-python/oxiphysics-wasm— early Python and WebAssembly bridge APIs.
Tips
- Start from the umbrella crate, then trim.
cargo add oxiphysicsgives you everything through one import while you explore. Once you know which domains you use, switch to the individual sub-crates (oxiphysics-collision,oxiphysics-fem, …) to shrink your build graph and compile times. - Reach straight for the solver you need. Fluids?
oxiphysics-sph(particle) oroxiphysics-lbm(lattice). Structures?oxiphysics-fem. Molecules?oxiphysics-md. They share the sameoxiphysics-coremath types, so coupling data between them never crosses a language boundary. - Pick the SPH scheme that matches your problem. 0.1.0 ships WCSPH, IISPH, DFSPH, and PCISPH — use a weakly-compressible scheme (WCSPH) for fast free-surface splashing and an incompressible/divergence-free scheme (IISPH/DFSPH) when you need tight density control.
- Lean on the I/O layer for interop. OxiPhysics reads and writes VTK, OpenFOAM, LAMMPS dump, PDB, GLTF, and HDF5 — so you can drive it from existing meshes and trajectories and visualise results in ParaView without writing a converter.
- Trust the “zero stubs” guarantee. There are no
todo!()orunimplemented!()calls anywhere in the workspace — if an API is there, it computes a real result, which makes 0.1.0 safe to build real prototypes on.
This is the foundation
OxiPhysics is the simulation layer of the broader COOLJAPAN pure-Rust ecosystem — the same philosophy that drives projects like SciRS2 (scientific computing), OxiBLAS (linear algebra), OxiFFT (spectral transforms), and OxiARC (pure-Rust compression): reconstruct the world’s essential native libraries in safe, sovereign Rust, with no hidden C dependency in the default build. This 0.1.0 is the starting point for all of it — a single engine where rigid bodies, fluids, molecules, and structures finally share one language.
Repository: https://github.com/cool-japan/oxiphysics
Star the repo if you want one memory-safe engine instead of four separate C/C++/Fortran toolchains.
Pure Rust physics is here — fast, safe, and sovereign.
— KitaSan at COOLJAPAN OÜ April 6, 2026