Data & AnalyticsSoftware EngineeringOpen accessPublished 2 Oct 2026
rust_decimal — fixed-point decimal arithmetic for Rust. 128-bit signed
decimal, exact (no float rounding errors), suitable for finance, currency,
Bitcoin sat ↔ fiat conversions, accounting. Up to 28 significant digits,
arithmetic preserves precision. Includes RoundingStrategy for explicit
truncation/rounding control. Integrates with serde, sqlx, postgres.
USE WHEN: user mentions "rust_decimal", "Decimal", "dec!", "RoundingStrategy",
"no float", "exact arithmetic", "fixed-point Rust", "currency math Rust",
"sat to fiat conversion"
DO NOT USE FOR: Crypto primitives - use `security/libsodium` or `bitcoin/cryptography/*`
DO NOT USE FOR: BigInteger / arbitrary-precision math…