opendp 0.6.1

A library of differential privacy algorithms for the statistical analysis of sensitive private data.
Documentation
[workspace.package]
version = "0.6.1"
license-file = "../LICENSE"
readme = "../README.md"
homepage = "https://opendp.org/"
repository = "https://github.com/opendp/opendp"
authors = ["The OpenDP Project <info@opendp.org>"]
edition = "2021"
rust-version = "1.64.0" # MSRV via `cargo intall msrv && cargo msrv -- cargo check --features=untrusted,bindings-python`

[workspace]
members = [".", "opendp_derive", "opendp_tooling"]

[workspace.dependencies]
syn = { version = "1.0", features = ["full", "parsing"] }
quote = { version = "1.0" }
proc-macro2 = { version = "1.0" }

[package]
name = "opendp"
description = "A library of differential privacy algorithms for the statistical analysis of sensitive private data."
build = "build/main.rs"
version.workspace = true
license-file.workspace = true
readme.workspace = true
homepage.workspace = true
repository.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true

exclude = ["windows/*"]

[dependencies]
opendp_derive = { path = "opendp_derive", version = "0.6.1" }
rand = "0.7.3"
num = "0.3.1"
thiserror = "1.0.24"
backtrace = "0.3"
statrs = "0.13.0"
rug = { version = "1.14.0", default-features = false, features = ["integer", "float", "rational", "num-traits", "rand"], optional = true }
az = { version = "1.2.0", optional = true }
gmp-mpfr-sys = { version = "1.4.7", default-features = false, features = ["mpfr", "force-cross"], optional = true }
openssl = { version = "0.10.29", features = ["vendored"], optional = true }

lazy_static = { version = "1.4.0", optional = true }
vega_lite_4 = { version = "0.6.0", optional = true }

[build-dependencies]
opendp_tooling = { path = "opendp_tooling", version = "0.6.1", optional = true }
syn = { workspace = true, optional = true }
proc-macro2 = { workspace = true, optional = true }

[features]
default = ["use-openssl", "use-mpfr"]

floating-point = []
contrib = []
honest-but-curious = []
untrusted = ["floating-point", "contrib", "honest-but-curious"]

use-openssl = ["openssl"]
use-mpfr = ["gmp-mpfr-sys", "rug", "az"]
# re-export use-system-libs from mpfr
use-system-libs = ["use-mpfr", "gmp-mpfr-sys/use-system-libs"]

# for plotting in unit tests
test-plot = ["vega_lite_4"]

# include extern "C" functions in cdylib
ffi = ["lazy_static"]
# execute proc macros to insert proof links
derive = ["opendp_tooling", "opendp_derive/full", "syn", "proc-macro2"]
# generate python language bindings
bindings-python = ["ffi", "derive"]

[dev-dependencies]
criterion = "0.4"

[lib]
crate-type = ["rlib", "cdylib"]

[package.metadata.docs.rs]
features = ["derive", "untrusted", "ffi"]
rustdoc-args = [
    # so that latex renders
    "--html-in-header", "katex.html",
    
    # so that proof documents are visible
    "--document-private-items"
]

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