Releases

Whippyunits 0.2.1 brings stable Rust support for dimensional math

Whippyunits 0.2.1 moved dimensional math onto stable Rust, and rust-analyzer now resolves algebraic intermediates cleanly for faster iteration.

Nina Kowalski··2 min read
Published
Listen to this article0:00 min
Whippyunits 0.2.1 brings stable Rust support for dimensional math
Photo illustration

Whippyunits just turned a once-nightly experiment into something Rust developers can reach for on stable. In 0.2.1, the crate picked up a contributed typemath polyfill, removing the need for nightly const_generic_expressions in normal use and clearing one of the biggest friction points for anyone trying to wire units-of-measure checks into real code. The release also fixed a practical annoyance in the editor: algebraic intermediates now resolve correctly in rust-analyzer, so complicated quantity math is easier to inspect while you build.

That matters because Whippyunits is not trying to be a toy abstraction. The crate encodes scale in the type itself with a log-prime-factorized representation, which lets rescaling live inside the type system instead of hiding in runtime conversions. Its arithmetic is scale-explicit, so a mismatch does not quietly get patched up behind your back; it becomes a compile-time error unless you deliberately call a rescale function and say how the conversion should behave. That design is pitched as fixed-point friendly and numerically stable, which makes it a natural fit for simulation code, robotics, signal processing, and other domains where a silent unit bug can sink an otherwise correct algorithm.

AI-generated illustration
AI-generated illustration

The packaging around that core has also been built for day-to-day use. Whippyunits describes itself as a zero-cost, pure Rust units-of-measure library for applied computation, with no-std and no-alloc support. Its documentation says Quantity is a zero-cost wrapper type, and runtime binaries only carry the underlying numeric type. The project also leans on developer tooling rather than expecting users to fight the type system in silence: the library supports pretty-printing for complex quantity types, language-server integration, hover info, and inlay hints through rust-analyzer. Docs.rs even exposes serialization and deserialization for Quantity values, including strings and JSON objects.

The shift to stable support is especially notable because the project spent its early life in the unstable lane. The first public introduction on November 17, 2025 said Whippyunits still depended on generic-const-expressions while a stable typemath polyfill was in progress. Now the repository README says the opposite by default: stable Rust is the normal path, with optional nightly generic_const_exprs available behind a cge feature flag. On GitHub, the Rust repository sits under the WhippyUnits organization with 216 commits and 30 stars, a small but active footprint for a crate that has moved from promise to practical adoption.

For a library built around dimensional rigor, that is the real milestone in 0.2.1. The value is not just that Whippyunits can compile on stable Rust. It is that the workflow around it finally looks like something a working engineer can keep open in an everyday project, with nightly no longer the price of keeping units straight.

This article was produced by Prism’s automated news system from verified source data, official records, and press releases, then run through automated quality and moderation checks before publishing. The system is built and supervised by the people who set the standards it runs under. Read our full AI policy.

Know something we missed? Have a correction or additional information?

Submit a Tip

Never miss a story.

Get Rust Programming updates weekly. The top stories delivered to your inbox.

Free forever · Unsubscribe anytime

Discussion

More Rust Programming News