Dashu is approaching v1.0: it's a full alternative to GMP+MPFR+MPC, and it's now more optimized
โ Rust ๐ 2026-07-11 ๐ค surdeus ๐๏ธ 1Hi everyone!
It's been about 4 years since I first announced dashu here, and a lot has happened since โ so I wanted to share where dashu stands today. Dashu is a library set of arbitrary precision numbers (aka. big numbers) written in pure Rust, with full no_std support. The goal from day one has been to be a Rust-native alternative to the classic C stack of GNU GMP + MPFR + MPC โ but with ergonomic, idiomatic, safe Rust APIs, and no C toolchain, no unsafe FFI, and no build headaches.
It's a set of sub-crates, all re-exported through the meta-crate dashu:
| Type | dashu alias | Replaces |
|---|---|---|
UBig / IBig |
Natural / Integer |
GMP (mpz) |
FBig / DBig |
Real / Decimal |
MPFR (mpfr) |
RBig |
Rational |
GMP (mpq) |
CBig |
Complex |
MPC (mpc) |
With the recent addition of dashu-cmplx (arbitrary-precision complex numbers, CBig), the last big piece of the puzzle is in place: dashu now covers integers, rationals, real floats (binary and decimal), and complex numbers โ with correctly-rounded transcendentals and C99 Annex G branch-cut/signed-zero semantics on the float and complex sides. That rounds out the GMP+MPFR+MPC feature surface.
Here's what's new and why I think now is a great time to give it a try.
It's almost feature complete โ v1.0 is coming at the end of the year
The current release is 0.5.0, and it's essentially feature complete. The plan from here:
- v0.5.x point releases will be mostly correctness improvements and non-breaking performance work (e.g. a Ziv retry loop for guaranteed-correct rounding, signed-zero edge cases, faster kernels). All additive, no breaking changes.
- v1.0 is expected at the end of this year, and will mainly be about finalizing and stabilizing the public APIs.
If you want to see exactly what's planned (and what's deferred to post-v1), I keep a public roadmap here:
On top of features, this cycle brought a lot of optimization work โ better division and multiplication kernels, a Montgomery reducer, ownership-aware arithmetic, and cached transcendental wrappers (CachedFBig / CachedCBig, exposed as FastReal / FastComplex) that share a constant cache so repeated high-precision transcendental calls don't recompute constants like ฯ from scratch.
There's a proper online user guide now
API docs are great for reference, but they don't always tell you how to actually use a library. So dashu now has a full mdBook user guide with concise overviews and runnable examples covering types, construction, conversion, parsing/printing, serialization, all the operations (arithmetic, exp/log, trig/hyperbolic, bit manipulation, number theory), plus an FAQ, performance notes, a cheatsheet, and a standards-compliance page:
It's a companion to the API docs on docs.rs and is the fastest way to get a feel for what dashu can do. (And a small but fun milestone along the way: dashu finally has its own logo/icon to go with the maturing codebase.)
You can now try dashu from Python โ no Rust toolchain needed
There's a new PyO3-based Python binding so you can kick the tires without setting up a Rust project. It exposes dashu's arbitrary-precision integers, rationals, floats, and complex numbers to Python:
pip install dashu-rs
It's a friendly test field for the core functionality (and honestly a decent standalone arbitrary-precision package for the Python ecosystem in its own right). If you've been curious but didn't want to spin up a Cargo project just to experiment, this is for you.
One caveat for now: the binding is early, and PyPI currently only has a single wheel for Python 3.12 + Linux x86_64. More platforms and versions will follow โ but if you're on that combo, you can pip install and go today.
Please give it a try โ I'd love your feedback before the APIs are frozen
This is the big ask. v1.0 will lock in the public APIs, so now is the ideal window to shape them. If something feels awkward, if a type or trait is missing, if the docs are unclear, or if you hit a bug โ please tell me.
I will happily and gratefully fix issues before finalizing the APIs for v1.0. Bug reports, API-ergonomics feedback, missing-feature requests, benchmark results against GMP/MPFR/MPC โ all of it is welcome and genuinely helpful right now.
- Repo & issues: GitHub - cmpute/dashu: A library set of arbitrary precision numbers implemented in Rust. ยท GitHub
- Crate: crates.io: Rust Package Registry
- Docs: dashu - Rust
- Guide: Introduction - Dashu user guide
- Python: dashu-rs ยท PyPI
[dependencies]
dashu = "0.5"
Thanks for reading โ and thank you in advance to anyone who takes it for a spin. Your feedback in these last few months before v1.0 will directly make the 1.0 release better. ![]()
1 post - 1 participant
๐ท๏ธ Rust_feed