numra
Composable numerical methods for Rust — differential equations, optimization, sensitivity analysis, uncertainty quantification, linear algebra, and more in one workspace.
numra is the umbrella crate of the Numra workspace: twenty native-Rust crates covering ordinary, stochastic, delay, fractional, integro-, and partial differential equations, plus forward sensitivity analysis, uncertainty quantification, optimization, automatic differentiation, linear algebra, statistics, quadrature, interpolation, special functions, FFT, signal processing, and curve fitting — under one unified facade with shared Scalar and Vector abstractions and a single error model. Dense linear algebra builds on faer; the rest is native Rust with no FFI to C or Fortran.
Install
[]
= "0.1"
To depend on a single subsystem instead of the whole workspace, use the corresponding member crate directly (e.g. numra-ode = "0.1").
Quick start
use ;
let problem = new;
let opts = default.rtol;
let result = solve.expect;
let y_end = result.y_final.expect;
assert!;
Composability
Numra is designed so that subsystems compose without glue: ODE trajectories flow into interpolation, interpolation into quadrature, autodiff Jacobians into optimization, optimization into curve fitting, PDE state vectors into statistics — all sharing one NumraError type and the same Scalar/Vector traits. End-to-end workflows are verified in numra/tests/interop_workflows.rs:
| Workflow | Test |
|---|---|
| ODE → cubic spline → quadrature | workflow_ode_interp_integrate |
| ODE → FFT → signal processing → peak detection | workflow_ode_fft_signal_peaks |
| Parameter estimation → sensitivity → uncertainty | workflow_param_est_sensitivity_uncertainty |
| Autodiff → optimization → curve fitting | workflow_autodiff_optim_fit |
| PDE method-of-lines → statistics | workflow_pde_statistics |
| Sampling → Monte Carlo ODE | workflow_stats_monte_carlo_ode |
Narrative patterns and worked examples live in the book chapter Composing solvers.
Subsystems
| Subsystem | Module path | Member crate |
|---|---|---|
| Core (Scalar, Vector, Signal, errors, uncertainty) | numra::{scalar, vector, signal, error, uncertainty} |
numra-core |
| ODE / DAE | numra::ode |
numra-ode |
| SDE | numra::sde |
numra-sde |
| DDE | numra::dde |
numra-dde |
| FDE (fractional) | numra::fde |
numra-fde |
| IDE (Volterra) | numra::ide |
numra-ide |
| PDE (Method of Lines) | numra::pde |
numra-pde |
| SPDE | numra::spde |
numra-spde |
| Linear algebra | numra::linalg |
numra-linalg |
| Nonlinear solvers | numra::nonlinear |
numra-nonlinear |
| Optimization | numra::optim |
numra-optim |
| Optimal control / parameter estimation | numra::ocp |
numra-ocp |
| Quadrature | numra::integrate |
numra-integrate |
| Interpolation | numra::interp |
numra-interp |
| Special functions | numra::special |
numra-special |
| FFT and spectral analysis | numra::fft |
numra-fft |
| Statistics | numra::stats |
numra-stats |
| Curve fitting | numra::fit |
numra-fit |
| Automatic differentiation | numra::autodiff |
numra-autodiff |
| Digital signal processing | numra::dsp |
numra-signal |
Examples
Fifteen runnable examples ship with the crate; four span the breadth:
Full list: see [[example]] entries in numra/Cargo.toml or the examples gallery.
Documentation
- Book: https://book.numra-rs.org/ — narrative chapters per subsystem with executable examples
- Website: https://numra-rs.org/
- API reference: https://docs.rs/numra
- Source: https://github.com/moussaoutlook/numra-rs
- Changelog: https://github.com/moussaoutlook/numra-rs/blob/main/CHANGELOG.md
License
Numra is licensed under the Numra Academic & Research License (Non-Commercial).
- Academic and research use: free as in freedom.
- Commercial use: requires a separate license. Contact
contact@spectralautomata.comto discuss terms.
See LICENSE for the full text.