The Rustification
Rust

The future is Rust.
Zero-cost abstractions, total safety.

Every C++ pricing model is being ported to Rust with the same numerical precision. Result<T,E> everywhere, no silent NaN, no exceptions. The Rust ports are the new golden masters.
Generated from MathIR
/// Black-76 call — actual code from ReflexLibs.Ai/options/black76
/// High-precision NormDist injectable: StandardNormDist (f64, erfc tail-stable)
/// or StandardNormDistDecimal (128-bit, 28-digit arithmetic)
#[inline]
pub fn price_of_call_nd<N: NormDist>(
    nd: &N,
    forward: f64, strike: f64, time_to_expiry: f64, volatility: f64,
) -> Result<f64, Black76Error> {
    if forward <= 0.0 { return Err(Black76Error::NegativeForward); }
    let t_vol = volatility * time_to_expiry.sqrt();
    let d1 = (forward / strike).ln() / t_vol + 0.5 * t_vol;
    let d2 = d1 - t_vol;
    Ok((forward * nd.cdf(d1) - strike * nd.cdf(d2)).max(0.0))
}

// f64 — StandardNormDist (erfc-based, tail-stable)
let price = price_of_call_nd(&StandardNormDist, F, K, T_market, sigma)?;

// Decimal128 — StandardNormDistDecimal (28-digit arithmetic)
let price = lognormal_decimal::price_of_call_nd(
    &StandardNormDistDecimal, F, K, T_market, sigma)?;

// Time-dilated — FOMC/NFP event warping baked into T
let T_market = dilation.scale_interval(now, expiry);
let price = price_of_call_nd(&StandardNormDist, F, K, T_market, sigma)?;
RUST Timeline

Rust in ReflexLibs

Now
Golden Master Pricing
Black-76 lognormal, Bachelier, shifted-lognormal — ported from C++ heritage with bitwise parity. NormDist as swappable trait. Result<T,E> everywhere, no silent NaN.
Now
Secure Desktop Platform
Six-crate air-gapped desktop: xll-platform-core, render-html, render-pdf, transport, xll-secure-app (HIGH SECURITY, no Chromium), xll-secure-preview.
Now
WASM Browser Target
Rust → WASM via wasm-pack. nanotable_wasm.wasm <500KB embedded in Nano.Vault. Compute-heavy pricing in the browser, no server round-trip.
Now
Decimal128 Precision
rust_decimal crate providing 128-bit decimal arithmetic for all pricing packs. Phases 1–5 complete (333 tests). Eliminates IEEE 754 double rounding drift.
Next
GPU Renderer (wgpu)
Phase 3 wgpu+dwrote+etagere GPU-accelerated NanoTable rendering. Font atlas with on-demand glyph rasterization. Per-cell CSS font-size overrides.
Next
Time Dilation Models
Relativistic time-decay corrections for options pricing — novel research applying time dilation to theta and variance processes.
333
Decimal128 Tests
6
Secure Crates
0
Unsafe Blocks
WASM
Browser Target
Port Log

Recent Updates

22 Apr 2026C#rustC++
Heston Normal — dual-path draft: Sidani 2014 paper + heritage C++ converge on MathIR
"
// Two ports, one MathIR — dual provenance for every future stochastic-vol family

public static class HestonNormalFromPaper {    // Path A — SSRN 2445328, negative-i

public static double PriceOfCall(double F, double K, double tau, /* ... */) { /* ... */ }

// Φ(τ,u,ν₀) = exp(C(τ) + D(τ)ν₀ − iu·x₀)  ← paper convention

}

public static class HestonNormalFromHeritage { // Path B — heritage, positive-i

public static double PriceOfCall(double F, double K, double tau, /* ... */) { /* ... */ }

// phi(u) = exp(cv + dv·v0 + i·u·forward), called with −u ← heritage convention

}

// Cross-check: |A − B| < 1e-10 on 25 randomised parameter sweeps.

// Sidani Table 1: reproduced at 5e-5 by BOTH paths.  Heritage vectors: 1e-9.
16 Apr 2026rustC#
ECOICOP V1/V2 era validation — ?AsOf= and ?Version= API
Inflation symbology API now validates COICOP codes against the ECOICOP era in effect on any given date. CP023 (tobacco, V2) is valid from 2026-02-01. CP022 (tobacco, V1) is valid before that date. Explicit ?Version= always wins over ?AsOf=.
// Priority: explicit Version > AsOf-inferred > default (V2)

public static bool IsCoicopValidAsOf(string coicop, EcoicopVersion version)

=> coicop switch {

    "CP023" => version is V2 or V3,   // COICOP 2018 — from Feb 2026

    "CP022" => version is V1,          // COICOP 1999 — pre Feb 2026

    _       => true                    // era-independent

};
15 Apr 2026rustC#
decimal128 Phase 1 — C# System.Decimal + Rust rust_decimal parity confirmed
Bitwise equivalence confirmed between C# System.Decimal and Rust rust_decimal. Both use a 96-bit mantissa with a decimal scale factor — same model, different language. Foundation for the decimal128 pricing workstream across Black-76, SABR, and NormDist.
use rust_decimal_macros::dec;



// Exact decimal arithmetic — no float rounding

let result = dec!(0.1) + dec!(0.2);

assert_eq!(result, dec!(0.3)); // ✓ exact



// C# cross-validation:

// decimal r = 0.1m + 0.2m;

// Debug.Assert(r == 0.3m); // ✓ same result
View full port log →
Languages

One Library, Nine Runtimes

Rust
Rust
The future. Zero-cost abstractions.
C++
C++
Heritage. Production since 2010.
C#
C#
Triumvirate partner. .NET 8.
Go
Go
Cloud-native. Concurrency built in.
JavaScript
JavaScript
Web glue. WASM target.
TypeScript
TypeScript
Type-safe JS. First-class support.
Python
Python
Scientific bridge. NumPy interop.
CUDA
CUDA
GPU compute. Parallel pricing.
Excel Lambda
Excel Lambda
Spreadsheet-native. No VBA.
Latest Development

Recent Updates

22 Apr 2026
Heston Normal — dual-path draft: Sidani 2014 paper + heritage C++ converge on MathIR
"
C#rustC++
16 Apr 2026
ECOICOP V1/V2 era validation — ?AsOf= and ?Version= API
Inflation symbology API now validates COICOP codes against the ECOICOP era in effect on any given date. CP023 (tobacco, V2) is valid from 2026-02-01. CP022 (tobacco, V1) is valid before that date. Explicit ?Version= always wins over ?AsOf=.
rustC#
16 Apr 2026
ReflexLibs.Symbology — 648 inflation indices live in production
Tier-0 library with zero internal dependencies ships to production. 8 tiers from TopThree(9) to SixHundredFortyEight(648). Full JSON API at /api/symbology/inflation with filtering by tier, geo, COICOP, and base year.
C#
15 Apr 2026
decimal128 Phase 1 — C# System.Decimal + Rust rust_decimal parity confirmed
Bitwise equivalence confirmed between C# System.Decimal and Rust rust_decimal. Both use a 96-bit mantissa with a decimal scale factor — same model, different language. Foundation for the decimal128 pricing workstream across Black-76, SABR, and NormDist.
rustC#
14 Apr 2026
nano-math-autodiff — Dual/Dual2 across C# and Rust, 57+23 tests
Automatic differentiation live in both C# and Rust. Dual<T> for first-order, Dual2<T> for second-order. Injectable NormDist architecture means Black-76 works with f64, Dual, or Dual2 — same code path, different numeric type. 57 C# tests + 23 Rust tests all passing.
rustC#
View full port log →