Crate features / rust_decimal
Feature flags · rust_decimal 1.43.0 · from crates.io 2026-10-24
rust_decimal features: what each one does, and the line to copy
Short answerrust_decimal 1.43.0 has 31 features. By default it turns on serde, std; add default-features = false to start from nothing. It needs Rust 1.67.1 or newer.
Pick features
Every feature
| Feature | In default | Turns on |
|---|---|---|
align16 | nothing else (a switch the code checks) | |
borsh | dep:borsh, std | |
bytemuck | c-repr, dep:bytemuck, dep:bytemuck_derive | |
c-repr | nothing else (a switch the code checks) | |
db-diesel-mysql | diesel/mysql_backend, std | |
db-diesel-postgres | diesel/postgres_backend, std | |
db-diesel2-mysql | db-diesel-mysql | |
db-diesel2-postgres | db-diesel-postgres | |
db-postgres | dep:bytes, dep:postgres-types, std | |
db-tokio-postgres | dep:bytes, dep:postgres-types, std | |
legacy-ops | nothing else (a switch the code checks) | |
macros | dep:rust_decimal_macros | |
maths | nothing else (a switch the code checks) | |
maths-nopanic | maths | |
ndarray | dep:ndarray | |
proptest | dep:proptest | |
rand | dep:rand | |
rand-0_9 | dep:rand-0_9 | |
rocket-traits | dep:rocket, std | |
rust-fuzz | dep:arbitrary | |
serde | yes | dep:serde, wasm-bindgen?/serde |
serde-arbitrary-precision | serde-with-arbitrary-precision | |
serde-bincode | serde-str | |
serde-float | serde-with-float | |
serde-str | serde-with-str | |
serde-with-arbitrary-precision | serde, serde_json/arbitrary_precision, serde_json/std, zmij | |
serde-with-float | serde | |
serde-with-str | serde | |
std | yes | arrayvec/std, wasm-bindgen?/std, borsh?/std, bytes?/std, rand?/std, rand-0_9?/std, serde?/std, serde_json?/std |
tokio-pg | db-tokio-postgres | |
wasm | dep:wasm-bindgen |
dep:x turns on the optional dependency x; x/y turns on feature y of dependency x (with ?, only if x is already on).
MSRV history
The minimum Rust version rust_decimal declares (rust-version), and the release that changed it:
- 1.27.0 (2022-11-24): Rust 1.60
- 1.37.0 (2025-03-17): Rust 1.67.1
Stuck on an older compiler? Pin the last version that supports it, for example cargo update -p rust_decimal --precise <version>, or use resolver 3, which picks compatible versions for you.
More on rust_decimal
docs.rs feature list · crates.io · license MIT · edition 2021
Up next
Next crateFeature flags for every popular crateRead it next →Also worth your time
Did this answer your question?