bitrep 0.2.0

Order-invariant, bit-identical floating-point reductions. Any order. Any hardware. Same bits.
Documentation
[package]
name = "bitrep"
version = "0.2.0"
edition = "2021"
rust-version = "1.74"
authors = ["Kyle Clouthier <kyle@simgen.dev>"]
license = "MIT OR Apache-2.0"
description = "Order-invariant, bit-identical floating-point reductions. Any order. Any hardware. Same bits."
repository = "https://github.com/KyleClouthier/bitrep"
documentation = "https://docs.rs/bitrep"
readme = "README.md"
keywords = ["deterministic", "reproducible", "summation", "crdt", "distributed"]
categories = ["mathematics", "algorithms", "no-std", "science"]
exclude = ["/.github", "/fuzz", "/demo", "/.claude", "/probes", "/paper", "RESEARCH.md"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[features]
default = ["std"]
std = []
serde = ["dep:serde"]
# Convergent statistics: mergeable, order-invariant moments (mean, variance,
# skewness, kurtosis, covariance, regression) with exactly rounded reads.
# Pulls num-bigint for the read-time exact-rational rounding only.
stats = ["std", "dep:num-bigint", "dep:num-traits"]
# Receipts: canonical state hashes (SHA-256 of the canonical encoding) for
# signing convergent aggregates. Bring your own signature scheme.
receipts = ["std", "dep:sha2"]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(kani)", "cfg(kani_slow)"] }

[dependencies]
serde = { version = "1", optional = true, default-features = false, features = ["derive"] }
num-bigint = { version = "0.4", optional = true }
num-traits = { version = "0.2", optional = true }
sha2 = { version = "0.10", optional = true }

[dev-dependencies]
# fork/timeout (default features) pull in wait-timeout, which doesn't build
# on wasm32 — and the fork runner isn't used here anyway.
proptest = { version = "1", default-features = false, features = ["std", "bit-set"] }
num-bigint = "0.4"
num-traits = "0.2"
serde_json = "1"
criterion = { version = "0.5", default-features = false }
sha2 = "0.10.9"
xsum = "0.1"

[[example]]
name = "convergent_stats"
required-features = ["stats"]

[[bench]]
name = "reductions"
harness = false

[profile.bench]
lto = true
codegen-units = 1