OxiPhysics is a unified, pure-Rust physics engine targeting the same problem
domains as Bullet (rigid body), OpenFOAM (CFD), LAMMPS (molecular
dynamics), and CalculiX (FEM) — with no C or Fortran dependencies, no
unsafe surprises, and strict Rustdoc enforcement.
| Crate | Status | Tests | Domain summary |
|---|---|---|---|
oxiphysics-core |
Alpha | 5,348 | Math, numerics, ODE, stochastic, tensors, signal processing, 80+ modules |
oxiphysics-geometry |
Alpha | 3,089 | Shapes, meshes, computational geometry, NURBS, CSG, 57+ modules |
oxiphysics-collision |
Alpha | 2,439 | GJK/EPA, SAP, BVH, CCD, ray casting, contact graphs |
oxiphysics-materials |
Alpha | 4,486 | Material models, hyperelastic, composites, biomaterials, smart materials |
oxiphysics-fem |
Alpha | 4,561 | Linear+nonlinear FEM, XFEM, spectral, stochastic FEM, 124 source files |
oxiphysics-gpu |
Alpha | 2,740 | CPU-fallback compute backend, ParticleSystem, parallel sort |
oxiphysics-io |
Alpha | 4,849 | VTK, PDB, LAMMPS, OpenFOAM, GLTF, HDF5, 80+ format modules |
oxiphysics-lbm |
Alpha | 5,313 | LBM D3Q19/D3Q27, MRT, multiphase, MHD, biofluid, traffic |
oxiphysics-md |
Alpha | 5,139 | MD forcefield, QM/MM, REMD, free energy, LAMMPS/AMBER compat |
oxiphysics-sph |
Alpha | 4,367 | WCSPH, IISPH, DFSPH, PCISPH, free surface, multiphase SPH |
oxiphysics-rigid |
Alpha | 3,810 | Rigid body dynamics, aerospace, spacecraft, marine, swarm |
oxiphysics-softbody |
Alpha | 3,469 | PBD, XPBD, cloth, hair, ropes, Cosserat rods, surgical sim |
oxiphysics-constraints |
Alpha | 2,173 | PGS/TGS solvers, joints, motors, islands, trajectory opt |
oxiphysics-vehicle |
Alpha | 2,669 | Vehicle dynamics, Pacejka tires, EV, autonomous driving |
oxiphysics-viz |
Alpha | 4,072 | CPU software renderer, scientific plotting, volume rendering, VR |
oxiphysics-python |
Partial | 788 | JSON/serde bridge API (no PyO3 FFI dep yet) |
oxiphysics-wasm |
Partial | 826 | JSON/serde bridge API (no wasm-bindgen dep yet) |
oxiphysics |
top-level re-exports | — | Single-crate entry point for all modules |
- Zero stubs — no
todo!()orunimplemented!()calls anywhere in the workspace. - ~60,189 tests across 17 crates, all passing under
cargo nextest. - Strict docs —
RUSTDOCFLAGS='-D warnings' cargo docpasses with no missing-docs warnings. - Pure Rust — zero C/Fortran build-time dependencies; default features are 100% Rust.
cargo publish --dry-runpasses for the top-leveloxiphysicscrate.
What is already implemented in each domain:
- Core math & numerics — Vec3, Quat, Mat3, Transform, AABB; ODE integrators (RK4, Dormand-Prince, Rosenbrock); stochastic processes; signal processing (FFT, wavelets, filtering); tensors; sparse linear algebra; interval arithmetic; automatic differentiation; optimization (BFGS, NLP, convex).
- Geometry — Sphere, Box, Capsule, Cylinder, ConvexHull, TriangleMesh, NURBS surfaces/curves, CSG Boolean operations; mesh repair; computational geometry (Delaunay, Voronoi, convex hull); spatial indexing.
- Collision detection — GJK + EPA narrow phase; sweep-and-prune (SAP) broad phase; BVH (AABB tree); CCD (continuous collision detection); ray/segment casting; contact manifold generation; contact graphs.
- Rigid body dynamics — RK4/symplectic integrators; inertia tensor computation; island detection; sleeping; aerospace (attitude control, orbital mechanics); spacecraft; marine hydrodynamics; swarm robotics.
- Constraint solvers — PGS and TGS iterative solvers; hinge, ball-socket, slider, fixed, prismatic joints; motors; trajectory optimisation; warm starting.
- Vehicle dynamics — Pacejka magic-formula tires; suspension kinematics; multi-gear drivetrain; electric vehicle (EV) powertrain; autonomous driving plant model.
- SPH fluids — WCSPH, IISPH, DFSPH, PCISPH kernels; free-surface tracking; multiphase; viscosity; surface tension; neighbour search (spatial hash, KD-tree).
- Lattice Boltzmann (LBM) — D3Q19 and D3Q27 lattices; SRT, MRT, TRT collision operators; turbulence (Smagorinsky); biofluid; magnetohydrodynamics (MHD); traffic flow.
- Finite Element Method (FEM) — linear and nonlinear (hyperelastic, elasto-plastic) FEM; XFEM crack propagation; spectral elements; stochastic FEM (PCE); CalculiX-compatible I/O; tetrahedral and hexahedral elements.
- Molecular Dynamics (MD) — Lennard-Jones, Buckingham, Morse, and custom pair potentials; ReaxFF reactive force field; QM/MM coupling; REMD; free energy perturbation; LAMMPS and AMBER file compatibility.
- Soft body — mass-spring; PBD (position-based dynamics); XPBD; cloth with self-collision; hair simulation; Cosserat elastic rods; surgical simulation model.
- Materials — hyperelastic (Neo-Hookean, Mooney-Rivlin, Ogden); elasto-plastic (von Mises, Drucker-Prager); composite laminates; biomaterials; shape-memory alloys; piezoelectric.
- GPU/compute backend — CPU-fallback work-stealing scheduler; parallel radix sort; particle system; pipeline for SPH and LBM kernels; ready for future GPU back-ends.
- I/O — VTK XML/legacy; PDB/mmCIF; LAMMPS dump; OpenFOAM; GLTF 2.0; HDF5; JSON/MessagePack checkpointing; 80+ format modules.
- Visualization — CPU software rasteriser; Phong + PBR shading; isosurface extraction (Marching Cubes); volume rendering; scientific line/scatter/contour plots; VR-ready camera rigs.
| Crate | Public Items | Primary purpose |
|---|---|---|
oxiphysics-core |
5,876 | Foundational math, traits, numerics |
oxiphysics-materials |
6,241 | Material model library |
oxiphysics-md |
6,343 | Molecular dynamics engine |
oxiphysics-io |
5,978 | Data I/O and format converters |
oxiphysics-lbm |
5,649 | Lattice Boltzmann CFD |
oxiphysics-fem |
5,273 | Finite element solver |
oxiphysics-viz |
5,229 | Visualization and rendering |
oxiphysics-sph |
5,066 | Smoothed-particle hydrodynamics |
oxiphysics-rigid |
4,815 | Rigid body dynamics |
oxiphysics-softbody |
4,524 | Soft body / cloth / rods |
oxiphysics-vehicle |
3,171 | Vehicle dynamics |
oxiphysics-constraints |
3,118 | Constraint and joint solvers |
oxiphysics-geometry |
3,245 | Shape and mesh primitives |
oxiphysics-gpu |
2,748 | Compute backend |
oxiphysics-collision |
2,625 | Collision detection |
oxiphysics-wasm |
1,276 | WASM bridge API |
oxiphysics-python |
1,200 | Python bridge API |
Add to your Cargo.toml:
[dependencies]
oxiphysics = "0.1.0"Or use individual sub-crates for smaller build graphs, e.g.:
[dependencies]
oxiphysics-core = "0.1.0"
oxiphysics-collision = "0.1.0"
oxiphysics-rigid = "0.1.0"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);cargo build --release
cargo nextest run --all-features
cargo clippy --all-features --all-targets
RUSTDOCFLAGS='-D warnings' cargo doc --all-features --no-depsApache-2.0. Copyright 2026 COOLJAPAN OU (Team KitaSan).