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
-
Config-generic streaming
StreamingDecoder<R, C>andStreamingEncoder<W, C>now carry a genericConfigtype parameter (C: Config = config::Configuration). The existingnew()constructors are unchanged and still default to the standard config, so nothing breaks. A newnew_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 throughStreamingDecoder::new_with_config. -
core::error::Errorinno_std
DeErrorandSerErrornow implementcore::error::Errorinstead ofstd::error::Error. The#[cfg(feature = "std")]gate is gone, so the impls are available inno_std + alloccontexts. This is the kind of fix Rust 1.81 unlocked, and it makes OxiCode’s serde integration first-class on embedded targets. -
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 stabilizedcore::error::Errorand made the change above possible. -
Pure Rust compression, forward
The OxiARC LZ4 and Zstd backends move from 0.2.8 to 0.3.2. Compression remains entirely pure Rust undercompression-lz4/compression-zstd— still no CzliborzstdFFI anywhere. -
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
- Added:
StreamingDecoder<R, C>/StreamingEncoder<W, C>are now generic overC: Config(defaulting toconfig::Configuration); existingnew()constructors are unchanged, and a newnew_with_config(reader/writer, codec_config)matches encoder/decoder configurations - Added: regression test
test_streaming_decoder_with_fixed_int_configcoveringnew_with_configwith a fixed-width-integer round-trip - Added: feature flags to the LZ4 compression test modules
- Changed: MSRV bumped from 1.74.0 to 1.81.0
- Changed:
DeErrorandSerErrornow implementcore::error::Error(no longerstd-gated), enabling them inno_std + alloc - Changed: OxiARC LZ4 / Zstd compression dependencies bumped from 0.2.8 to 0.3.2
- Fixed: removed spurious blank lines in several LZ4 compression test files
Tips
- Match your streaming config explicitly. If you encode with
with_fixed_int_encoding()(or any non-standard config), construct both ends withnew_with_config(..)so the decoder reads exactly what the encoder wrote. - Default streaming is unchanged. Keep calling
StreamingEncoder::new()/StreamingDecoder::new()for the standard config — the generic parameter defaults transparently, so existing code compiles untouched. - Embedded serde now has real errors. In
no_std + alloc,DeErrorandSerErrorimplementcore::error::Error, so they slot into your error-handling stack without astdfeature. - Mind the MSRV. OxiCode 0.2.4 requires Rust 1.81.0+; if you’re pinned below that, stay on 0.2.3 until you can upgrade your toolchain.
- Compression stays C-free.
compression-lz4andcompression-zstdnow ride OxiARC 0.3.2 — pure Rust, no FFI, no C build step.
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