#lapack #algebra #vector-matrix #matrix #linear

nalgebra-lapack

Matrix decompositions using nalgebra matrices and Lapack bindings

26 breaking releases

Uses new Rust 2024

0.27.0 Nov 13, 2025
0.26.0 Jul 31, 2025
0.25.0 Jun 23, 2024
0.24.0 Jan 14, 2023
0.1.0 Aug 30, 2015

#1131 in Math

Download history 277/week @ 2025-12-20 130/week @ 2025-12-27 200/week @ 2026-01-03 266/week @ 2026-01-10 146/week @ 2026-01-17 137/week @ 2026-01-24 177/week @ 2026-01-31 466/week @ 2026-02-07 279/week @ 2026-02-14 439/week @ 2026-02-21 489/week @ 2026-02-28 376/week @ 2026-03-07 159/week @ 2026-03-14 189/week @ 2026-03-21 216/week @ 2026-03-28 141/week @ 2026-04-04

722 downloads per month
Used in 9 crates

MIT license

2MB
40K SLoC

nalgebra-lapack Version Doc

Rust library for linear algebra using nalgebra and LAPACK.

Documentation

Documentation is available here.

License

MIT

Cargo features to select LAPACK provider

Like the lapack crate from which this behavior is inherited, nalgebra-lapack uses cargo features to select which LAPACK provider (or implementation) is used. Command line arguments to cargo are the easiest way to do this, and the best provider depends on your particular system. In some cases, the providers can be further tuned with environment variables.

Below are given examples of how to invoke cargo build on two different systems using two different providers. The --no-default-features --features "lapack-*" arguments will be consistent for other cargo commands.

Ubuntu

As tested on Ubuntu 24.04, do this to build the LAPACK package against the system installation of netlib without LAPACKE (note the E) or CBLAS:

sudo apt-get install gfortran libblas-dev liblapack-dev
export CARGO_FEATURE_SYSTEM_NETLIB=1
export CARGO_FEATURE_EXCLUDE_LAPACKE=1
export CARGO_FEATURE_EXCLUDE_CBLAS=1

export CARGO_FEATURES="--no-default-features --features lapack-netlib"
cargo build ${CARGO_FEATURES}

macOS

On macOS, do this to use Apple's Accelerate framework:

export CARGO_FEATURES="--no-default-features --features lapack-accelerate"
cargo build ${CARGO_FEATURES}

Contributors

This integration of LAPACK on nalgebra was initiated by Andrew Straw. It then became officially supported and integrated to the main nalgebra repository.

Dependencies

~72MB
~1M SLoC