55 releases

0.20.0 Feb 8, 2025
0.19.0 Apr 18, 2021
0.18.0 Apr 10, 2021
0.17.0 Feb 13, 2021
0.0.2 Nov 21, 2014

#251 in Math

Download history 5021/week @ 2026-02-19 4943/week @ 2026-02-26 5321/week @ 2026-03-05 3993/week @ 2026-03-12 3900/week @ 2026-03-19 3485/week @ 2026-03-26 3185/week @ 2026-04-02 5512/week @ 2026-04-09 5186/week @ 2026-04-16 6296/week @ 2026-04-23 4147/week @ 2026-04-30 4181/week @ 2026-05-07 5689/week @ 2026-05-14 5174/week @ 2026-05-21 4898/week @ 2026-05-28 9725/week @ 2026-06-04

26,455 downloads per month
Used in 69 crates (21 directly)

Apache-2.0 OR MIT

700KB
38K SLoC

LAPACK Package Documentation Build

The package provides wrappers for LAPACK (Fortran).

Architecture

Example

use lapack::*;

let n = 3;
let mut a = vec![3.0, 1.0, 1.0, 1.0, 3.0, 1.0, 1.0, 1.0, 3.0];
let mut w = vec![0.0; n as usize];
let mut work = vec![0.0; 4 * n as usize];
let lwork = 4 * n;
let mut info = 0;

unsafe {
    dsyev(b'V', b'U', n, &mut a, n, &mut w, &mut work, lwork, &mut info);
}

assert!(info == 0);
for (one, another) in w.iter().zip(&[2.0, 2.0, 5.0]) {
    assert!((one - another).abs() < 1e-14);
}

Development

The code is generated via a Python script based on the content the lapack-sys submodule. To re-generate, run the following commands:

./bin/generate.py > src/lapack-sys.rs
rustfmt src/lapack-sys.rs

Contribution

Your contribution is highly appreciated. Do not hesitate to open an issue or a pull request. Note that any contribution submitted for inclusion in the project will be licensed according to the terms given in LICENSE.md.

Dependencies

~60MB
~746K SLoC