Cargo Features

[dependencies]
opendp = { version = "0.14.2", default-features = false, features = ["floating-point", "contrib", "honest-but-curious", "untrusted", "polars", "use-openssl", "ffi", "derive", "extension-module", "bindings", "partials"] }
default = extension-module, partials, use-openssl

These default features are set whenever opendp is added without default-features = false somewhere in the dependency tree.

floating-point untrusted?
contrib untrusted?

Affects transformations::quantile_score_candidates

honest-but-curious untrusted?

Affects ffi::opendp_transformations__make_identity

untrusted = contrib, floating-point, honest-but-curious
polars = chrono, polars-arrow, polars-plan, polars-utils, pyo3, pyo3-polars, serde, serde-pickle

Enables polars =0.50.0

A strict version requirement is necessary to keep the serialization format of LazyFrames stable.
If you change the version of Polars,
be sure to also change the Python package version requirement and test binary compatibility.

The features track the features enabled in the Rust build for the Polars Python crate.
Having matching features is necessary for cross-binary DSL compatibility.

Affects accuracy::polars, opendp::polars, metrics::polars, metrics::MicrodataMetric.identifier

use-openssl default = openssl

Affects samplers::fill_bytes

ffi bindings? = cbindgen, lazy_static

include extern "C" functions in cdylib

Affects opendp::ffi, opendp::internal

derive bindings? partials = opendp_tooling, proc-macro2, syn

execute proc macros to insert proof links

Enables full of opendp_derive

extension-module default bindings?

extension-module necessary to remove requirement to statically link to libpython but can't be default because it interferes with testing

Enables extension-module of pyo3 ^0.25

bindings = derive, extension-module, ffi, pyo3-build-config

generate language bindings

partials default = derive

generate "then_xxx" functions in Rust for "make_xxx" functions whose first two arguments are the metric space

Enables partials of opendp_derive

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

openssl use-openssl
opendp_tooling derive?
polars-plan polars?

Enables polars-plan =0.50.0

polars-utils polars?

Enables polars-utils =0.50.0

chrono polars?

Enables chrono

matches the version specified in Polars: https://github.com/pola-rs/polars/blob/main/Cargo.toml

polars-arrow polars?

Enables polars-arrow =0.50.0

pyo3 extension-module polars?

Enables pyo3 ^0.25

pyo3-polars polars?

Enables pyo3-polars =0.23.1

serde polars?
serde-pickle polars?
lazy_static ffi?
syn build derive?
proc-macro2 build derive?
cbindgen build ffi?

Enables cbindgen ^0.28.0

pyo3-build-config build bindings?

Enables pyo3-build-config ^0.25