Nabled is an ndarray-native Rust numerical library focused on production-grade linear algebra and ML-oriented matrix/vector operations.
Optional Arrow interop is available behind feature arrow, using
ndarrow as the zero-copy Arrow/ndarray bridge while keeping
the core numerical crates ndarray-native.
Important! Nabled is under active development right now, so the only way to be sure the public APIs don't break is to pin your version. When stabilized, it will follow proper versioning, but for now it is guaranteed to change.
[dependencies]
nabled = "0.0.5"This list is ever-changing, consult the Rust Docs for the source of truth.
- SVD, QR, LU, Cholesky, Eigen, Schur, Polar
- Matrix functions (exp/log/power/sign)
- Triangular solve, Sylvester/Lyapunov
- PCA, regression, iterative solvers
- Numerical Jacobian/gradient/Hessian
- Statistics utilities
- Vector primitives (dot/norm/cosine/pairwise/batched)
use ndarray::arr2;
use nabled::linalg::svd;
fn main() -> Result<(), nabled::linalg::svd::SVDError> {
let a = arr2(&[[1.0_f64, 2.0], [3.0, 4.0]]);
let svd = svd::decompose(&a)?;
println!("singular values = {:?}", svd.singular_values);
Ok(())
}Review more examples in crates/nabled/examples.
nabled::core: shared errors, validation, and prelude exports.nabled::linalg: linear algebra and decomposition modules.nabled::ml: ML-oriented numerical routines.
blas: enablesndarray/blasacross participating workspace crates.openblas-system: enables provider-backed LAPACK paths via system OpenBLAS.openblas-static: enables provider-backed LAPACK paths via statically linked OpenBLAS.netlib-system: enables provider-backed LAPACK paths via system Netlib LAPACK.netlib-static: enables provider-backed LAPACK paths via statically linked Netlib LAPACK.magma-system: enables NVIDIA MAGMA provider-backed decomposition paths.accelerator-rayon: enables selected parallel CPU kernels.accelerator-wgpu: enables WGPU-backed dense/vector/tensor kernel paths (f32native,f64native whenSHADER_F64is available).arrow: enables facade-only Arrow/ndarray interop adapters backed byndarrow.
[dependencies]
nabled = { version = "0.0.5", features = ["openblas-system"] }[dependencies]
nabled = { version = "0.0.5", features = ["arrow"] }Arrow interop notes:
- Arrow awareness is isolated to facade crate
nabled; lower crates remain ndarray-native. - Direct Arrow ingress now spans the implementable real-valued dense, sparse, tensor, batched, and ML/stat workflows under the current explicit contracts.
- Arrow wrappers delegate to the same ndarray-native execution paths, so provider backends, GPU/backend routing, and MAGMA behavior are inherited rather than reimplemented.
- Exact direct-ingress coverage is tracked in
docs/ARROW_SUPPORT_MATRIX.md.
Feature behavior:
openblas-systemimpliesblas.- Provider feature selection (
openblas-system,openblas-static,netlib-system,netlib-static) is compile-time and internal to decomposition paths. magma-systemimplies provider-backed decomposition routing and composes with the OpenBLAS/LAPACK provider stack.- Backend acceleration is compile-time and kernel-family-specific.
- GPU-backend-dispatched kernels use explicit CPU fallback when no usable GPU is available.
f64native GPU execution depends onwgpu::Features::SHADER_F64; when unavailable, backend-dispatchedf64calls fall back to CPU.- Provider/toolchain requirements depend on provider choice;
openblas-staticandnetlib-staticrequire native build toolchains (gcc/gfortran/make), andnetlib-systemrequires a systemLAPACK/Fortran runtime available to the linker.
nabled is now ndarrow-powered behind feature arrow.
Current Arrow-ingress coverage includes:
- Dense/vector kernels
- LU, Cholesky, QR, SVD, Eigen, Schur, Polar, matrix-functions, triangular solves
- Sparse CSR primitives and solve workflows
- Batched decomposition helpers
- Tensor fixed-shape workflows
- Iterative solvers, Jacobian tools, optimization, PCA, regression, and stats
For exact module-by-module coverage and intentional remaining gaps, see:
docs/NDARROW_INTEGRATION.mddocs/ARROW_SUPPORT_MATRIX.md
just checksOn macOS, provider-enabled just recipes automatically set PKG_CONFIG_PATH and OPENBLAS_DIR for Homebrew OpenBLAS (/opt/homebrew/opt/openblas). No manual env export is required for those recipes.
just bench-smoke-reportLicensed under either:
- MIT license
- Apache License, Version 2.0
at your option.