COOLJAPAN
← All posts

TrustformeRS 0.2.1 Released — The Honesty Pass: Fabricated Logic Purged, Five Deadlocks Fixed

TrustformeRS 0.2.1 is a production-grade honesty and correctness pass: an RS256 JWT auth bypass deleted, five deadlocks fixed, dozens of fabricated/placeholder code paths replaced with real logic or structured errors, and cargo deny fully clean — 21,370 tests passing. The sovereign transformer layer for the COOLJAPAN ecosystem.

release trustformers rust transformers security reliability pure-rust machine-learning

TrustformeRS 0.2.1 went looking for every place the code was quietly inventing an answer instead of computing one — and deleted the invention.

Today we released TrustformeRS 0.2.1 — a production-grade honesty and correctness pass across the entire workspace: fabricated and placeholder logic replaced with real implementations or structured errors, unsound and orphaned code deleted, five deadlock-class bugs fixed, and dependency hygiene tightened end to end. The release was verified across three checkpoints — 2026-08-18, 2026-08-24, and a final validation on 2026-08-26 — landing at 21,370 tests passing, 0 failed (25,883 on --all-features), with clippy, doctests, and cargo deny all clean.

TrustformeRS is Pure Rust Hugging Face Transformers: transformer/LLM loading and inference, tokenizers, training, and serving — no Python required, no PyTorch, no libtorch anywhere in the workspace. It compiles to a single static binary — or to WASM, or onto mobile — and runs anywhere Rust runs. 0.2.1 adds a second, quieter kind of sovereignty: nothing this release ships silently invents a number, a status, or a response when it can’t actually produce one.

Why TrustformeRS 0.2.1 is a game changer

Running TrustformeRS before 0.2.1 meant trusting code that, in a surprising number of places, wasn’t telling the truth:

TrustformeRS 0.2.1 ends all of that:

Technical Deep Dive: what 0.2.1 actually changed under the hood

1. trustformers-serve — the biggest single cleanup. The resource_manager/ placeholder tree (11 files, 5,972 lines) that fabricated network ports (vec![8080] always), temp-directory paths, database connection ids, and GPU device stats is deleted outright — the unprefixed ResourceManagementSystem name now resolves to the real, tested resource_management module. Cloud-provider integrations, model management (ModelInstance::infer no longer synthesizes "Generated response for: {}"), notification channels, GPU statistics, and cache health checks all stop returning canned data.

2. Security and GPU lifetime (trustformers-core, trustformers-mobile). A new MetalBufferHandle RAII type releases a Metal buffer’s cache entry when the last handle drops, replacing stay-live-until-eviction semantics across every GPU-to-GPU result site trustformers-core owns. trustformers-mobile::advanced_security gains real post-quantum primitives — KyberKem (FIPS 203 ML-KEM), DilithiumSigner (FIPS 204 ML-DSA), SphincsSigner (FIPS 205 SLH-DSA) — replacing placeholder byte-tricks.

3. Model correctness (trustformers-models). Checkpoint loading for roberta, albert, fnet, nemotron, phi4, mistral_v3, phi2, yi, starcoder2, llama3, and command_r now binds real weights via Checkpoint::from_reader; architectures the machinery can’t yet serve faithfully (rwkv, mamba, hyena, performer, retnet, and others) now return a named not_implemented error instead of the same silent Ok(()). FNetLMPredictionHead is a real implementation for the first time, and GPT-2 contrastive search — publicly constructible since it was documented — actually runs instead of returning “not yet implemented for GPT-2”.

4. WASM honesty (trustformers-wasm). performance_profiler deletes 22 estimate_*/get_*/check_*/calculate_* helpers that invented CPU/GPU usage, memory/FLOPs/bandwidth, battery level, and an “ML-powered” improvement estimate — a public #[wasm_bindgen] API shape change. What remains is real: wall-clock duration, real WASM linear-memory growth, and a real Battery Status API read. ModelSplitter::analyze_model_structure stops inventing a transformer layout from buffer length alone (“first 1% is config, next 5% is vocabulary…”) and instead reads real SafeTensors component boundaries where the format is recognized.

Getting Started

cargo add trustformers
use trustformers::prelude::*;
use trustformers::{AutoModel, AutoTokenizer, Tensor};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let tokenizer = AutoTokenizer::from_pretrained("bert-base-uncased")?;
    let model = AutoModel::from_pretrained("bert-base-uncased")?;

    let tokenized = tokenizer.encode("Hello, Rust world!")?;
    let ids: Vec<f32> = tokenized.input_ids.iter().map(|&id| id as f32).collect();
    let len = ids.len();
    let inputs = Tensor::from_vec(ids, &[len])?;

    let outputs = model.forward(inputs)?;
    println!("Output shape: {:?}", outputs.shape());
    Ok(())
}

What’s New in 0.2.1

Security

Added

Changed

Removed

Fixed

Tips

This is the foundation

TrustformeRS 0.2.1 rides on OxiCUDA for CUDA compute, oxicuda-metal for Apple Silicon, SciRS2 for numerics, OxiBLAS for Pure-Rust BLAS/LAPACK, OxiCode for serialization, and OxiARC (oxiarc-zstd/-deflate/-lz4/-archive) for compression — with a new real SHA-256 and DEFLATE path replacing a byte-sum “checksum” and an uncompressed-but-mislabeled-Gzip storage bug in trustformers-wasm’s IndexedDB layer this release. It sits beside ToRSh, SkleaRS, and TenfloweRS in the COOLJAPAN model-training and serving stack.

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

Star the repo if you’d rather your transformer stack return a structured error than a plausible-looking lie. The era of monitoring dashboards that invent their numbers and pipelines that fake their inference is over. Pure Rust transformers — honest about what they can and can’t yet do — are here.

KitaSan at COOLJAPAN OÜ
August 26, 2026

↑ Back to all posts