122 lines
5.3 KiB
TOML
122 lines
5.3 KiB
TOML
[package]
|
|
authors = ["Paul Mason <paul@form1.co.nz>"]
|
|
build = "build.rs"
|
|
categories = ["science", "mathematics", "data-structures"]
|
|
description = "Decimal number implementation written in pure Rust suitable for financial and fixed-precision calculations."
|
|
documentation = "https://docs.rs/rust_decimal/"
|
|
edition = "2021"
|
|
exclude = ["tests/generated/*"]
|
|
keywords = ["decimal", "financial", "fixed", "precision", "number"]
|
|
license = "MIT"
|
|
name = "rust_decimal"
|
|
readme = "./README.md"
|
|
repository = "https://github.com/paupino/rust-decimal"
|
|
rust-version = "1.67.1"
|
|
version = "1.42.1"
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
|
targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]
|
|
|
|
[dependencies]
|
|
arbitrary = { default-features = false, optional = true, version = "1.0" }
|
|
arrayvec = { default-features = false, version = "0.7" }
|
|
borsh = { default-features = false, features = ["derive", "unstable__schema"], optional = true, version = "1.1.1" }
|
|
bytemuck = { default-features = false, optional = true, version = "1.17.1" }
|
|
bytemuck_derive = { default-features = false, optional = true, version = "1.7.1" }
|
|
bytes = { default-features = false, optional = true, version = "1.0" }
|
|
diesel = { default-features = false, optional = true, version = "2.2.3" }
|
|
ndarray = { default-features = false, optional = true, version = "0.15.6" }
|
|
num-traits = { default-features = false, features = ["i128"], version = "0.2" }
|
|
postgres-types = { default-features = false, optional = true, version = "0.2" }
|
|
proptest = { default-features = false, optional = true, features = ["std"], version = "1.0" }
|
|
rand = { default-features = false, optional = true, version = "0.8" }
|
|
rand-0_9 = { default-features = false, optional = true, package = "rand", version = "0.9" }
|
|
rust_decimal_macros = { path = "macros", default-features = false, optional = true, version = "1" }
|
|
rkyv = { default-features = false, features = ["size_32", "std"], optional = true, version = "0.7.46" }
|
|
rocket = { default-features = false, optional = true, version = "0.5.0-rc.3" }
|
|
zmij = { default-features = false, optional = true, version = "1.0" }
|
|
serde = { default-features = false, optional = true, version = "1.0" }
|
|
serde_json = { default-features = false, optional = true, version = "1.0" }
|
|
tokio-postgres = { default-features = false, optional = true, version = "0.7" }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
wasm-bindgen = { default-features = false, version = "0.2", optional = true }
|
|
|
|
[dev-dependencies]
|
|
criterion = { default-features = false, version = "0.5" }
|
|
csv = "1"
|
|
rust_decimal_macros = { path = "macros" }
|
|
serde = { default-features = false, features = ["derive"], version = "1.0" }
|
|
serde_json = "1.0"
|
|
version-sync = { default-features = false, features = ["html_root_url_updated", "markdown_deps_updated"], version = "0.9" }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
|
|
wasm-bindgen = { default-features = false, version = "0.2" }
|
|
wasm-bindgen-test = { version = "0.3" }
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
|
|
bincode = { default-features = false, version = "1.0" }
|
|
bytes = { default-features = false, version = "1.0" }
|
|
diesel = { default-features = false, features = ["mysql", "postgres"], version = "2.2.3" }
|
|
futures = { default-features = false, version = "0.3" }
|
|
postgres = { default-features = false, version = "0.19" }
|
|
rand = { default-features = false, features = ["getrandom"], version = "0.8" }
|
|
rand-0_9 = { default-features = false, features = ["thread_rng"], package = "rand", version = "0.9" }
|
|
rkyv-0_8 = { version = "0.8.13", package = "rkyv" }
|
|
tokio = { default-features = false, features = ["macros", "rt-multi-thread", "test-util"], version = "1.0" }
|
|
tokio-postgres = { default-features = false, version = "0.7" }
|
|
|
|
[features]
|
|
default = ["serde", "std"]
|
|
|
|
align16 = [] # Force Decimal to be repr(align16) - the same as u128
|
|
borsh = ["dep:borsh", "std"]
|
|
bytemuck = ["c-repr", "dep:bytemuck", "dep:bytemuck_derive"]
|
|
c-repr = [] # Force Decimal to be repr(C)
|
|
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 = []
|
|
macros = ["dep:rust_decimal_macros"]
|
|
maths = []
|
|
maths-nopanic = ["maths"]
|
|
ndarray = ["dep:ndarray"]
|
|
proptest = ["dep:proptest"]
|
|
rand = ["dep:rand"]
|
|
rkyv = ["dep:rkyv"]
|
|
rkyv-safe = ["rkyv/validation"]
|
|
rocket-traits = ["dep:rocket", "std"]
|
|
rust-fuzz = ["dep:arbitrary"]
|
|
serde = ["dep:serde", "wasm-bindgen?/serde"]
|
|
serde-arbitrary-precision = ["serde-with-arbitrary-precision"]
|
|
serde-bincode = ["serde-str"] # Backwards compatability
|
|
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 = ["arrayvec/std", "wasm-bindgen?/std", "borsh?/std", "bytes?/std", "rand?/std", "rkyv?/std", "serde?/std", "serde_json?/std"]
|
|
tokio-pg = ["db-tokio-postgres"] # Backwards compatability
|
|
wasm = ["dep:wasm-bindgen"]
|
|
|
|
[[bench]]
|
|
harness = false
|
|
name = "comparison"
|
|
path = "benches/comparison.rs"
|
|
|
|
[[example]]
|
|
name = "rkyv-remote"
|
|
required-features = ["macros"]
|
|
|
|
[workspace]
|
|
members = [
|
|
".",
|
|
"./macros",
|
|
]
|
|
resolver = "2"
|