COOLJAPAN
← All posts

OxiCode 0.2.4 Released — Config-Aware Streaming and no_std Error Trait Support

OxiCode 0.2.4 makes the streaming encoder/decoder generic over the Config type so encoder and decoder pairs can share an explicit codec configuration via new_with_config, implements core::error::Error for DeError/SerError in no_std + alloc, bumps the MSRV to 1.81, and moves OxiARC pure Rust compression to 0.3.2. Same 100% bincode-2.0 binary compatibility.

release oxicode bincode serialization serde no-std streaming pure-rust oxiarc

The most capable patch in the 0.2 line: streaming that knows its own config, and real error traits in no_std.

Today we released OxiCode 0.2.4 — a patch with genuine teeth. It makes streaming encoder/decoder pairs configuration-aware, lets OxiCode’s error types implement the standard error trait even in no_std, raises the floor to a modern MSRV, and carries the OxiARC pure-Rust compression backends forward. The wire format is unchanged: still 100% bincode-2.0 binary compatible.

No C. No Fortran. No std-only error story.
OxiCode stays a pure-Rust binary codec that compiles to a single static binary (or WASM) — now down to bare-metal no_std + alloc.

Why OxiCode 0.2.4 is a game changer

Two long-standing rough edges get filed down here.

First, streaming with a non-default configuration. Until now, the sync StreamingEncoder / StreamingDecoder assumed the standard config; if you encoded with fixed-width integers, there was no clean way to tell the decoder to match. 0.2.4 makes the configuration an explicit, type-checked part of the streaming pair.

Second, error ergonomics in no_std. OxiCode’s serde-path error types only implemented std::error::Error, gated behind the std feature. Embedded users couldn’t use them with the ?-friendly error-trait machinery. Rust 1.81 stabilized core::error::Error, so 0.2.4 takes advantage of it.

Technical Deep Dive: what changed under the hood

  1. Config-generic streaming
    StreamingDecoder<R, C> and StreamingEncoder<W, C> now carry a generic Config type parameter (C: Config = config::Configuration). The existing new() constructors are unchanged and still default to the standard config, so nothing breaks. A new new_with_config(reader/writer, codec_config) constructor lets you fix the codec configuration so encoder and decoder pairs agree — for example, both using fixed-width integer encoding. A regression test, test_streaming_decoder_with_fixed_int_config, covers exactly that fixed-int round-trip through StreamingDecoder::new_with_config.

  2. core::error::Error in no_std
    DeError and SerError now implement core::error::Error instead of std::error::Error. The #[cfg(feature = "std")] gate is gone, so the impls are available in no_std + alloc contexts. This is the kind of fix Rust 1.81 unlocked, and it makes OxiCode’s serde integration first-class on embedded targets.

  3. A modern MSRV
    The minimum supported Rust version moves from 1.74.0 to 1.81.0 (set in [workspace.package].rust-version) — the version that stabilized core::error::Error and made the change above possible.

  4. Pure Rust compression, forward
    The OxiARC LZ4 and Zstd backends move from 0.2.8 to 0.3.2. Compression remains entirely pure Rust under compression-lz4 / compression-zstd — still no C zlib or zstd FFI anywhere.

  5. Test-suite tidy-up
    Feature flags were added to the LZ4 compression test modules, and spurious blank lines were removed from several LZ4 test files — keeping the no-warnings, clean-format posture intact.

Getting Started

cargo add oxicode

Stream records with a matched, explicit configuration — the headline 0.2.4 capability:

use oxicode::config;
use oxicode::streaming::{StreamingEncoder, StreamingDecoder};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Fixed-width integer encoding on both ends
    let cfg = config::standard().with_fixed_int_encoding();

    let mut buf = Vec::new();
    let mut encoder = StreamingEncoder::new_with_config(&mut buf, cfg)?;
    for value in [1u64, 2, 3] {
        encoder.encode(&value)?;
    }
    encoder.finish()?;

    // The decoder is told to use the same config
    let mut decoder = StreamingDecoder::new_with_config(buf.as_slice(), cfg)?;
    let first: u64 = decoder.decode()?;
    assert_eq!(first, 1);
    Ok(())
}

What’s New in 0.2.4

Tips

This is the foundation

OxiCode is the serialization layer beneath the COOLJAPAN data stack — checkpoints for SciRS2 and NumRS2, tensor buffers for ToRSh, archive-embedded payloads with OxiARC, simulation state for engines like Spintronics. Config-aware streaming and no_std error traits push that foundation further onto constrained and bare-metal targets, all while keeping the bincode-2.0 wire format and a strict pure-Rust guarantee.

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

Star the repo if you want streaming serialization that’s configurable, embeddable, and entirely free of C.

Pure Rust binary serialization is here — fast, compatible, and sovereign.

KitaSan at COOLJAPAN OÜ June 4, 2026

↑ Back to all posts