COOLJAPAN
← All posts

SciRS2 0.4.1 Released — JIT-Accelerated Numeric Kernels and Browser-Side GPU, in Pure Rust

SciRS2 0.4.1 is a pure-Rust SciPy/NumPy/scikit-learn replacement: 2.91M SLoC, 25,863 tests, 32 crates. This release improves JIT compilation in scirs2-core, ships a 76-test WebGPU/WASM backend for browser GPU compute, and validates 15+ distributions to numerical accuracy. No C. No Fortran.

release scirs2 scientific-computing ai numpy scipy pure-rust jit webgpu machine-learning

Hot numeric kernels now specialize themselves at runtime — and your scientific computing can run in a browser tab.

Today we released SciRS2 0.4.1 — a patch release that hardens the just-in-time compilation layer in scirs2-core and ships a battle-tested WebGPU/WASM backend, on top of the 0.4.0 feature wave from ten days ago.

No C. No Fortran. No NumPy system dependencies. SciRS2 is a production-ready, pure-Rust replacement for the NumPy/SciPy/scikit-learn stack — and it compiles to a single static binary (or to WASM) that runs everywhere, from laptops to browsers to CUDA boxes. There is no pip install, no shared-library hunt, no glibc roulette. You ship one artifact and it runs.

Why SciRS2 0.4.1 matters

The Python numeric world has lived with the same compromise for a decade. Plain loops are slow, so you reach for Numba or NumExpr to bolt a JIT onto the runtime. GPU means CUDA, which means NVIDIA-only and a toolchain install. And “compute in the browser” has never really existed — you fall back to a server round-trip.

SciRS2 0.4.1 chips away at all three:

All of this sits on top of the 0.4.0 release: Transformers and GANs in scirs2-neural, Bayesian MCMC/NUTS/HMC and survival analysis in scirs2-stats, NUFFT in scirs2-fft, constrained optimization, change-point detection, and more.

The scale is real, not aspirational. SciRS2 0.4.1 is 2.91M SLoC (precisely 2,908,818 lines across 7,640 files), 25,863 tests passing (out of 36,475 total #[test] annotations), spread across 32 workspace crates. Tagline: Production-Ready Pure Rust Scientific Computing • No System Dependencies • 10-100x Performance Gains. All 25,863 tests pass on Apple M3 (ARM64), Linux x86_64, and Linux+CUDA. Windows builds succeed with some test failures. Zero warnings, by policy.

Technical Deep Dive

Core JIT (scirs2-core). Think of what NumExpr and Numba do for Python, but native to the library and on by default. When a numeric kernel runs hot, the JIT layer specializes it for the actual data and host: adjacent element-wise ops get fused into a single pass over memory (one load, one store instead of many), the SIMD width is chosen for the CPU you’re actually on, and the per-element dispatch overhead disappears. 0.4.1 widens the set of operations that take this fast path — you get the speedup without touching your code.

GPU & WASM. The WebGPU backend (76 tests) brings GPU compute to the browser and to Node via WASM — the same compute path, just targeting wasm32 and the GPU exposed through WebGPU. On Linux+CUDA, the native CUDA backend accelerates eigensolvers and kernels for server-class workloads.

Scientific. Linear algebra is backed by OxiBLAS (pure-Rust BLAS/LAPACK), so SVD, eigendecomposition, and the rest run with no OpenBLAS/LAPACK/MKL anywhere in the build. FFTs — including the NUFFT (type 1/2/3) added in 0.4.0 — run on OxiFFT. Statistical distributions (15+) are now validated to numerical accuracy.

AI / ML. scirs2-neural carries the 0.4.0 deep-learning layer: Transformers (multi-head attention, positional encoding, encoder/decoder, layernorm) and a GAN framework (WGAN-GP, spectral norm, conditional GAN) — all pure Rust, all on the same numeric core.

Getting Started

Add it to your project:

cargo add scirs2

A first taste — pure-Rust SVD and a validated distribution:

use scirs2::prelude::*;
use ndarray::Array2;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let a = Array2::from_shape_vec((3, 3), vec![
        1.0, 2.0, 3.0,
        4.0, 5.0, 6.0,
        7.0, 8.0, 9.0,
    ])?;

    // OxiBLAS-backed SVD, pure Rust
    let (_u, s, _vt) = scirs2::linalg::decomposition::svd(&a)?;
    println!("Singular values: {:.4?}", s);

    // Sample from a validated distribution
    let normal = scirs2::stats::distributions::normal::Normal::new(0.0, 1.0)?;
    let samples = normal.random_sample(5, None)?;
    println!("Samples: {:.4?}", samples);
    Ok(())
}

What’s New in 0.4.1

This is an incremental release that polishes the 0.4.0 line — honest and incremental, no API breakage.

Tips

This is the foundation

As of March 28, 2026, the COOLJAPAN ecosystem has had a busy month — and SciRS2 is the numeric and scientific bedrock beneath it. The just-shipped SkleaRS (classical ML), TenfloweRS (deep learning), and TrustformeRS (transformers) all stand on this same pure-Rust core, alongside ToRSh, OxiONNX, and OxiWhisper. When those libraries do linear algebra, FFTs, or statistics, they do it through SciRS2 — which means through OxiBLAS, OxiFFT, OxiCode, and oxiarc-*, with no C or Fortran in sight.

Repository: https://github.com/cool-japan/scirs

Star the repo if you want a scientific computing and AI stack that ships as one binary and runs anywhere.

Pure Rust scientific computing and AI is here — fast, safe, and sovereign.

KitaSan at COOLJAPAN OÜ March 28, 2026

↑ Back to all posts