nalgebra

General-purpose linear algebra library for the Rust ecosystem

Library
Cargo
v0.35.0
4,775stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
59/100Fair
Development Activity40
Maintenance16
Community80
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
78/100Good
Architecture88
Code Quality86
Innovation82
Learning Curve58

nalgebra is a general-purpose linear algebra library for Rust, supporting both statically-sized and dynamically-sized matrices and vectors. It provides the numeric foundation for graphics, robotics, physics, and scientific computing, with transformations, rotations, and a full suite of matrix decompositions.

Beyond raw matrix math, nalgebra offers geometric types such as points, quaternions, isometries, and projective transforms, along with optional sparse matrices, WebAssembly support, and a no_std mode for embedded targets.

What You Get

  • Statically- and dynamically-sized matrices and vectors
  • Geometric types: points, rotations, quaternions, isometries, and projections
  • Matrix decompositions including LU, QR, Cholesky, SVD, and eigen solvers
  • Optional sparse matrix support and BLAS-backed multiplication
  • no_std and WebAssembly compatibility for embedded and web targets

Common Use Cases

  • 3D graphics and game engine math for transforms and cameras
  • Robotics and physics simulations requiring rigid-body transforms
  • Scientific and numerical computing with matrix decompositions
  • Computer-vision and SLAM pipelines needing linear solvers

Under The Hood

Architecture — nalgebra is organized into a base module holding the generic Matrix storage abstraction (parameterized over dimension and storage type), a geometry module for transforms and quaternions, a linalg module for decompositions, plus sparse, io, and proptest modules and third_party integrations. Tech Stack — Rust edition 2024 (MSRV 1.89) built on num-traits, num-complex, simba (SIMD abstraction), matrixmultiply, and approx, with optional serde, rand, and BLAS/LAPACK bindings behind feature flags. Code Quality — The project is large, mature, and actively developed, with property-based tests via a dedicated proptest module, extensive documentation on nalgebra.rs, and a long release history. API Design — The type system encodes matrix dimensions generically, which yields strong compile-time guarantees at the cost of complex signatures; the geometry types offer an ergonomic high-level API, so the learning curve is steeper for the generic core than for everyday transform usage.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search