#floating-point #string-conversion #no-alloc #float

no-std zmij

A double-to-string conversion algorithm based on Schubfach and yy

34 releases (21 stable)

new 1.0.20 Feb 8, 2026
1.0.19 Feb 1, 2026
1.0.18 Jan 30, 2026
1.0.6 Dec 31, 2025
0.0.1 Dec 18, 2025

#149 in Value formatting

Download history 15776/week @ 2025-12-17 1621850/week @ 2025-12-24 2115246/week @ 2025-12-31 2832922/week @ 2026-01-07 3340237/week @ 2026-01-14 4402291/week @ 2026-01-21 4532187/week @ 2026-01-28 4841908/week @ 2026-02-04

17,681,889 downloads per month
Used in 93,680 crates (25 directly)

MIT license

61KB
1K SLoC

Żmij

github crates.io docs.rs build status

Pure Rust implementation of Żmij, an algorithm to quickly convert floating point numbers to decimal strings.

This Rust implementation is a line-by-line port of Victor Zverovich's implementation in C++, https://github.com/vitaut/zmij.

Example

fn main() {
    let mut buffer = zmij::Buffer::new();
    let printed = buffer.format(1.234);
    assert_eq!(printed, "1.234");
}

Performance

The dtoa-benchmark compares this library and other Rust floating point formatting implementations across a range of precisions. The vertical axis in this chart shows nanoseconds taken by a single execution of zmij::Buffer::new().format_finite(value) so a lower result indicates a faster library.

performance


License

MIT license.

Dependencies

~77KB