COOLJAPAN
← All posts

TenfloweRS 0.1.1 Released — Ergonomic Prelude, tensor! Macro, and wgpu 29

TenfloweRS 0.1.1 is an ergonomics + compatibility patch for the pure-Rust TensorFlow alternative: a declarative tensor! macro, an expanded prelude (transformers and RNNs), ndarray interop, ONNX re-exports, wgpu v29 compatibility across 57 sites, and richer typed Python FFI errors.

release tenflowers machine-learning deep-learning tensorflow rust neural-networks wgpu

Less boilerplate, more model — TenfloweRS 0.1.1 sands down the rough edges of the first stable release and keeps pace with the wgpu 29 GPU stack.

Today we released TenfloweRS 0.1.1 — an ergonomics and compatibility patch that adds a declarative tensor! macro, a much wider prelude, ndarray interop, and full wgpu v29 compatibility on top of the 0.1.0 foundation.

TenfloweRS is the pure-Rust answer to TensorFlow. No C runtime, no CUDA-C kernels, no Python interpreter wedged into your deployment story — the eager and graph execution engines, autodiff, and GPU backends are all Rust, all the way down. 0.1.1 does not change that contract; it simply makes the front door easier to walk through.

Why 0.1.1 matters

The 0.1.0 release was the first stable cut, and shipping it surfaced the friction that only real use exposes. Constructing tensors meant verbose, explicit calls where a literal would have been clearer. The prelude covered the basics but left transformer and recurrent building blocks out of easy reach, so model code reached deep into module paths. The Python FFI flattened rich error types into generic exceptions, throwing away the information a Python user most needs. And wgpu kept evolving underneath us, leaving API drift to paper over.

0.1.1 closes those gaps with concrete wins drawn straight from the changelog: a tensor![] macro for shape-inferred construction, an expanded prelude that surfaces MultiHeadAttention, TransformerEncoder/TransformerDecoder, RMSNorm, GRU, LSTM, and RNN directly, interop::ndarray conversions to bridge existing array code, typed Python exceptions via into_py_err(), and a thorough wgpu v29 migration touching 57 call sites across tenflowers-core and tenflowers-dataset.

What’s New in 0.1.1

Meta-crate ergonomics (tenflowers)

Dataset crate (tenflowers-dataset)

FFI crate (tenflowers-ffi)

wgpu v29 compatibility (fix)

Documentation and tooling

Under the hood, dependencies moved forward too: rayon 1.11→1.12, the scirs2-core/-autograd/-neural/-linalg/-numpy crates bumped to 0.4.2, wgpu pinned to v29, pyo3 to 0.28, and optirs to 0.3.

Getting Started

Add the meta-crate:

cargo add tenflowers

A quick taste of the 0.1.1 ergonomics — the new tensor! macro, type aliases, an expanded prelude, and ndarray interop, all in a few lines:

use tenflowers::prelude::*;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // New in 0.1.1: declarative, shape-inferred tensor creation
    let x: Tensor2D<f32> = tensor![[1.0, 2.0, 3.0],
                                   [4.0, 5.0, 6.0]];
    println!("x shape: {:?}", x.shape());

    // Expanded prelude now exposes transformer + recurrent layers directly
    let encoder = TransformerEncoder::new(/* d_model */ 512, /* heads */ 8, /* layers */ 6);
    let norm = RMSNorm::new(512);
    let _ = (&encoder, &norm); // wired into a model in real use

    // ndarray interop (new in 0.1.1)
    let nd = x.to_ndarray()?;
    let back = Tensor::<f32>::from_ndarray(&nd)?;
    println!("round-trip shape: {:?}", back.shape());
    Ok(())
}

Tips

A growing foundation

TenfloweRS sits inside the COOLJAPAN ecosystem and leans on it directly: NumRS2 for n-dimensional arrays, SciRS2 (now at 0.4.2) for the scientific core, OptiRS for optimizers, and Oxicode for serialization. The new ONNX re-exports pair naturally with OxiONNX for interchange, and TenfloweRS stands alongside ToRSh, TrustformeRS, and sklears as the COOLJAPAN machine-learning stack — a deep-learning framework next to a tensor library, a transformers library, and classical ML.

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

Star the repo if a pure-Rust TensorFlow alternative with a clean, ergonomic prelude is something you want to see grow. Feedback, issues, and pull requests are all welcome — 0.1.1 is shaped by exactly that kind of real-world use.

KitaSan at COOLJAPAN OÜ April 24, 2026

↑ Back to all posts