Cargo Features
[dependencies]
rust_decimal = { version = "1.33.1", default-features = false, features = ["borsh", "c-repr", "db-diesel-mysql", "db-diesel-postgres", "db-diesel1-mysql", "db-diesel1-postgres", "db-diesel2-mysql", "db-diesel2-postgres", "db-postgres", "db-tokio-postgres", "legacy-ops", "maths", "maths-nopanic", "ndarray", "rand", "rkyv", "rkyv-safe", "rocket-traits", "rust-fuzz", "serde", "serde-arbitrary-precision", "proptest", "serde-bincode", "std", "serde-float", "serde-str", "serde-with-arbitrary-precision", "serde-with-float", "serde-with-str", "tokio-pg", "diesel1", "diesel2"] }
- default = serde, std
-
These default features are set whenever
rust_decimal
is added without
somewhere in the dependency tree.default-features = false - borsh = std
- c-repr
-
Force Decimal to be repr(C)
- db-diesel-mysql = db-diesel1-mysql
- db-diesel-postgres = db-diesel1-postgres
- db-diesel1-mysql db-diesel-mysql? = std
-
Enables mysql of diesel ^1.0
- db-diesel1-postgres db-diesel-postgres? = std
-
Enables postgres of diesel ^1.0
- db-diesel2-mysql = std
- db-diesel2-postgres = std
- db-postgres = std
- db-tokio-postgres tokio-pg? = std
-
Enables bytes, postgres, and tokio-postgres
- legacy-ops
- maths maths-nopanic?
- maths-nopanic = maths
- ndarray
- rand
- rkyv
- rkyv-safe
-
Enables validation of rkyv
- rocket-traits
-
Enables rocket
- rust-fuzz
-
Enables arbitrary
- serde default serde-with-arbitrary-precision? serde-with-float? serde-with-str?
-
Affects
rust_decimal::serde
… - serde-arbitrary-precision = serde-with-arbitrary-precision
- proptest
- serde-bincode = serde-str
-
Backwards compatability
- std default borsh? db-diesel1-mysql? db-diesel1-postgres? db-diesel2-mysql? db-diesel2-postgres? db-postgres? db-tokio-postgres?
-
Enables std of arrayvec, optional borsh, optional bytes, optional rand, optional rkyv, optional serde, and optional serde_json
- serde-float = serde-with-float
- serde-str serde-bincode? = serde-with-str
- serde-with-arbitrary-precision serde-arbitrary-precision? = serde
-
Enables arbitrary_precision and std of serde_json
Affects
serde::arbitrary_precision
,serde::arbitrary_precision_option
,serde::DecimalFromString
,rust_decimal::serde
… - serde-with-float serde-float? = serde
-
Affects
serde::float
,serde::float_option
,rust_decimal::serde
… - serde-with-str serde-str? = serde
-
Affects
serde::str
,serde::str_option
,rust_decimal::serde
… - tokio-pg = db-tokio-postgres
-
Backwards compatability
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features.
- diesel1 implicit feature
-
Enables diesel ^1.0
- diesel2 implicit feature
-
Enables diesel