Scirs
SciRS2 - Scientific Computing and AI in Rust., providing SciPy-compatible APIs while leveraging Rust's performance, safety, and concurrency features. Unlike traditional scientific libraries
Install / Use
/learn @cool-japan/ScirsREADME
SciRS2 - Scientific Computing and AI in Rust
Production-Ready Pure Rust Scientific Computing • No System Dependencies • 10-100x Performance Gains
SciRS2 is a comprehensive scientific computing and AI/ML infrastructure in Pure Rust, providing SciPy-compatible APIs while leveraging Rust's performance, safety, and concurrency features. Unlike traditional scientific libraries, SciRS2 is 100% Pure Rust by default with no C/C++/Fortran dependencies required, making installation effortless and ensuring cross-platform compatibility.
Quick Start
# Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Add SciRS2 to your project
cargo add scirs2
# Build your project - no system libraries needed!
cargo build --release
Key Highlights
✨ Pure Rust: Zero C/C++/Fortran dependencies (OxiBLAS for BLAS/LAPACK, OxiFFT for FFT) ⚡ Ultra-Fast: 10-100x performance improvements through SIMD optimization 🔒 Memory Safe: Rust's ownership system prevents memory leaks and data races 🌍 Cross-Platform: Linux, macOS, Windows, WebAssembly - identical behavior 🧪 Battle-Tested: 25,863 tests, 2.91M lines of Rust code, 32 workspace crates 📊 Comprehensive: Linear algebra, statistics, ML, FFT, signal processing, computer vision, and more
Project Overview
SciRS2 provides a complete ecosystem for scientific computing, data analysis, and machine learning in Rust, with production-grade quality and performance that rivals or exceeds traditional C/Fortran-based libraries.
🎉 Release Status: v0.4.1 (2026-03-28)
Latest Stable Release - v0.4.1 (March 28, 2026) 🚀
- ✅ 25,863 Tests: Full test suite across 32 workspace crates (36,475 total #[test] annotations)
- ✅ 2.91M Lines of Rust Code: Comprehensive coverage of scientific computing and AI/ML
- ✅ 31 Workspace Crates: Specialized modules for every scientific computing domain
- ✅ 80,800+ Public API Items: Extensive, well-documented API surface
- ✅ Only 19 Stubs Remaining: Near-complete implementation across all modules
- ✅ Pure Rust by Default: OxiBLAS, OxiFFT, oxiarc-* - zero C/Fortran dependencies
- ✅ Zero Warnings Policy: Clean build with 0 compilation errors, 0 clippy warnings, 0 rustdoc warnings
- 📅 Release Date: March 28, 2026
What's New in 0.4.1:
- JIT compilation improvements in scirs2-core — enhanced just-in-time compilation infrastructure
- 60+ clippy warnings fixed — zero-warning workspace (clippy, rustdoc, compilation)
- Flash Attention 2, QAT, ONNX export, LoRA/DoRA/GPTQ — production neural network training and deployment
- GPU PDE solvers, GPU FFT pipeline, GPU SpMV — hardware-accelerated scientific computing
- Temporal GNN (TGAT/TGN), Graph Transformers (GraphGPS/Graphormer) — state-of-the-art graph ML
- NeRF/instant-NGP, 3D detection, depth completion — advanced computer vision
- NUMA-aware scheduler, lock-free data structures — high-performance core infrastructure
- WebGPU/WASM backend with 76 tests — browser-side GPU compute
- Conformal prediction, Bayesian NNs, INLA — uncertainty quantification and Bayesian ML
- Cache-oblivious FFT, adaptive sparse FFT — advanced spectral methods
- mdBook documentation (26 EN + 12 JP pages) — comprehensive bilingual docs
- Distribution validation (78 tests, 15+ distributions) — numerical accuracy verified
- Deep Kriging, GP Surrogate, online streaming interpolation — advanced interpolation
- Neural Audio (Conv-TasNet/vocoder/enhancement) — audio ML pipeline
- Delta Lake, TileDB, Arrow Flight, Kafka — enterprise data I/O
- PCMCI causality, physics-informed time series — advanced time series analysis
- OxiARC Compression Upgrades: Upgraded all OxiARC compression libraries (oxiarc-archive, oxiarc-lz4, oxiarc-bzip2, oxiarc-zstd, oxiarc-core, oxiarc-deflate) from 0.2.4 to 0.2.5
- Crates.io Migration: Migrated oxiarc-snappy and oxiarc-brotli from local path dependencies to crates.io version 0.2.5
- Clippy Cleanup: Fixed ~50 clippy warnings across the workspace (sort_by to sort_by_key, manual checked division, loop counters, redundant closures)
- Dependency Cleanup: Removed 10+ unused dependencies (ndarray-npy, x509-parser, itertools, num-rational, gmp-mpfr-sys, opentelemetry-prometheus, opentelemetry-semantic-conventions, mongodb, redis, prost) — eliminated
zipcrate from dependency tree
- Pure Rust Compression: Replaced C-based compression (flate2, lz4, zstd, bzip2) with oxiarc pure Rust alternatives across core, cluster, and io
- Pure Rust Memory Profiling: Replaced tikv-jemallocator with OS-native APIs (Mach task_info/procfs)
- WASM Target Support: Added getrandom WASM backend and wasm32 configuration
- Pure Rust Directory Detection: Replaced
dirscrate with customplatform_dirsmodule - Parquet Pure Rust: Configured parquet with pure Rust feature flags, switched Zstd to Brotli codec
- pyo3 0.28.2 Upgrade: Migrated Python bindings to pyo3 0.28.2 (
Python::with_gil->Python::attach) - #[pyclass] Deprecation Fixes: Updated
from_py_objectattribute usage to resolve deprecation warnings - Benchmark Modernization: Replaced deprecated
criterion::black_boxwithstd::hint::black_boxacross all benchmarks
- Neural Networks: Transformer architectures (GPT-2, T5, Swin), GNNs (GCN/GAT/GIN), diffusion models, capsule networks, spiking neural networks (SNN)
- Advanced Statistics: Gaussian process regression, survival analysis (Cox/Kaplan-Meier/Nelson-Aalen), Bayesian networks, copulas, nonparametric Bayes
- Signal Processing: OMP/ISTA compressed sensing, LMS/RLS adaptive filtering, MFCC/EMD, source separation (ICA/NMF)
- Graph Algorithms: Louvain/Girvan-Newman community detection, VF2 isomorphism, Node2Vec embeddings, network flow
- Sparse Linear Algebra: LOBPCG, IRAM, AMG, BCSR/ELLPACK formats, block preconditioners
- Time Series: TFT, N-BEATS, DeepAR, VECM, DFM, EGARCH/FIGARCH, online ARIMA
- Optimization: SQP, LP/QP interior point, SGD/Adam/NSGA-III, MIP/SDP/SOCP solvers
- FFT Extensions: Sparse FFT, Prony method, MUSIC, Lomb-Scargle, Burg method, NTT
- Interpolation: RBF, MLS, Floater-Hormann, spherical harmonics, kriging
- Special Functions: Mathieu, Coulomb wave functions, Wigner 3j/6j, Jacobi theta
- Computer Vision: Stereo matching, depth estimation, ICP point cloud registration, SLAM
- Julia Bindings: New Julia interface for seamless interoperability
See SCIRS2_POLICY.md for architectural details and CHANGELOG.md for complete release history.
🦀 Pure Rust by Default
SciRS2 is 100% Pure Rust by default - no C, C++, or Fortran dependencies required!
Unlike traditional scientific computing libraries that rely on external system libraries (OpenBLAS, LAPACK), SciRS2 provides a completely self-contained Pure Rust implementation:
- ✅ BLAS/LAPACK: Pure Rust OxiBLAS implementation (no OpenBLAS/MKL/Accelerate required)
- ✅ FFT: Pure Rust OxiFFT with FFTW-comparable performance (no C libraries required)
- ✅ Random Number Generation: Pure Rust implementations of all statistical distributions
- ✅ All Core Modules: Every scientific computing module works out-of-the-box without external dependencies
Benefits:
- 🚀 Easy Installation:
cargo add scirs2- no system library setup required - 🔒 Memory Safety: Rust's ownership system prevents memory leaks and data races
- 🌍 Cross-Platform: Same code works on Linux, macOS, Windows, and WebAssembly
- 📦 Reproducible Builds: No external library version conflicts
- ⚡ Performance: High performance Pure Rust FFT via OxiFFT (FFTW-compatible algorithms)
Optional Performance Enhancements (not required for functionality):
oxifftfeature: High-performance Pure Rust FFT with FFTW-compatible algorithmsmpsgraphfeature: Apple Metal GPU acceleration (macOS only, Objective-C)cudafeature: NVIDIA CUDA GPU accelerationarbitrary-precisionfeature: GMP/MPFR for arbitrary precision arithmetic (C library)
Enable with: cargo add scirs2 --features oxifft,cuda
By default, SciRS2 provides a fully functional, Pure Rust scientific computing stack that rivals the performance of traditional C/Fortran-based libraries while offering superior safety, portability, and ease of use.
Features
Scientific Computing Core
- Linear Algebra (
scirs2-linalg): Matrix operations, GMRES/PCG/BiCGStab iterative solvers, Lanczos/Arnoldi factorizations, CP-ALS/Tucker tensor decompositions, matrix functions (expm/logm/sqrtm), control theory (Riccati/Lyapunov) - Statistics (
scirs2-stats): Distributions (stable, GPD, von Mises-Fisher, Tweedie), Bayesian methods (NUTS/HMC/SMC), Gaussian processes, survival analysis (Cox/KM/AFT), copulas, Bayesian networks, causal inference - Optimization (
scirs2-optimize): MIP/SDP/SOCP solvers, Bayesian optimization, NSGA-III multi-objective, stochastic (SGD/Adam/SVRG), metaheuristics (ACO/SA/DE/Harmony), convex (ADMM/proximal), combi
