Two crates that expose Intel oneAPI Math Kernel Library (oneMKL) to Rust:
onemkl-sys— comprehensive raw FFI bindings, generated bybindgenfrom the officialmkl.humbrella header.onemkl— safe, idiomatic Rust API built on top ofonemkl-sys.
For current coverage and what's planned, see ROADMAP.md.
- Intel oneAPI Math Kernel Library installed locally. The build script
searches
MKLROOT,ONEAPI_ROOT/mkl/latest, and standard install paths. - LLVM /
libclangforbindgen(setLIBCLANG_PATHto your LLVMbindirectory if not auto-detected). - A recent Rust toolchain (this project is on Edition 2024, MSRV 1.95).
cargo build --workspace
cargo test --workspaceIf the build can't find your MKL install, set MKLROOT:
# Windows
$env:MKLROOT = "C:\Program Files (x86)\Intel\oneAPI\mkl\latest"
# Linux / macOS
export MKLROOT=/opt/intel/oneapi/mkl/latestExactly one feature must be selected from each of:
| Group | Features |
|---|---|
| Interface | lp64 (default), ilp64 |
| Threading | threading-sequential (default), threading-intel-openmp, threading-tbb |
| Linkage | link-dynamic (default), link-static |
Each oneMKL domain has its own feature, all enabled by default. Foundation
modules (error, enums, matrix, scalar, service) are always built.
| Feature | Module |
|---|---|
blas |
onemkl::blas |
data-fitting |
onemkl::data_fitting |
dss |
onemkl::dss |
feast |
onemkl::feast |
fft |
onemkl::fft |
iss |
onemkl::iss |
lapack |
onemkl::lapack |
optim |
onemkl::optim |
pardiso |
onemkl::pardiso |
pde |
onemkl::pde |
preconditioners |
onemkl::preconditioners |
rng |
onemkl::rng |
sparse |
onemkl::sparse |
vm |
onemkl::vm |
For a minimal build pulling in only BLAS and LAPACK:
[dependencies.onemkl]
version = "..."
default-features = false
features = [
"lp64", "threading-sequential", "link-dynamic",
"blas", "lapack",
]Off by default; require an MPI runtime:
cluster-sparse-solver, cdft, scalapack, blacs, pblas.
Dual-licensed under MIT or Apache-2.0, at your option.
These bindings link against Intel oneMKL, which has its own license terms (the Intel Simplified Software License). Comply with both.