Thanks to visit codestin.com
Credit goes to lib.rs

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

no-std zmij

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

28 releases (15 stable)

new 1.0.14 Jan 13, 2026
1.0.13 Jan 11, 2026
1.0.6 Dec 31, 2025
0.1.11 Dec 27, 2025
0.0.1 Dec 18, 2025

#143 in Value formatting

Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App

8,147,204 downloads per month
Used in 82,362 crates (20 directly)

MIT license

55KB
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

~83KB