37 releases (24 stable)
| 1.0.23 | Jul 13, 2026 |
|---|---|
| 1.0.22 | Jul 12, 2026 |
| 1.0.21 | Feb 12, 2026 |
| 1.0.18 | Jan 30, 2026 |
| 0.0.1 | Dec 18, 2025 |
#107 in Value formatting
76,534,270 downloads per month
Used in 141,861 crates
(52 directly)
77KB
1.5K
SLoC
Żmij
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.
License
Dependencies
~150KB