content: [workspace.package]
  version = "0.14.1-dev"
  license-file = "../LICENSE"
  readme = "../README.md"
  homepage = "https://opendp.org/"
  repository = "https://github.com/opendp/opendp"
  authors = ["The OpenDP Project <info@opendp.org>"]
  edition = "2024"
  rust-version = "1.85.0" # MSRV via `cargo install cargo-msrv && cargo msrv --min 1.49.0 -- cargo check --all-features`
  
  [workspace]
  members = [".", "opendp_derive", "opendp_tooling"]
  default-members = [".", "opendp_derive", "opendp_tooling"]
  
  [workspace.dependencies]
  syn = { version = "2.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.14.1-dev" }
  rand = "0.7.3"
  num = "0.3.1"
  thiserror = "1.0.24"
  statrs = "0.13.0"
  dashu = { version = "0.4.0", features = ["num-traits_v02"] }
  openssl = { version = "0.10.71", features = ["vendored"], optional = true }
  
  opendp_tooling = { path = "opendp_tooling", optional = true, version = "0.14.1-dev" }
  readonly = "0.2"
  bitvec = "1.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.
  polars = { version = "=0.50.0", features = [
      "meta",
      # polars-python/polars
      "abs",
      "approx_unique",
      "array_any_all",
      "arg_where",
      "bitwise",
      "business",
      "concat_str",
      "cum_agg",
      "cumulative_eval",
      "dataframe_arithmetic",
      "month_start",
      "month_end",
      "offset_by",
      "diagonal_concat",
      "diff",
      "dot_diagram",
      "dot_product",
      "dtype-categorical",
      "dtype-full",
      "dynamic_group_by",
      "ewma",
      "ewma_by",
      "fmt",
      "fused",
      "interpolate",
      "interpolate_by",
      "is_first_distinct",
      "is_last_distinct",
      "is_unique",
      "is_between",
      "is_close",
      "lazy",
      "list_eval",
      "list_to_struct",
      "list_arithmetic",
      "array_arithmetic",
      "array_to_struct",
      "log",
      "mode",
      "moment",
      "ndarray",
      "partition_by",
      "product",
      "random",
      "range",
      "rank",
      "reinterpret",
      "replace",
      "rolling_window",
      "rolling_window_by",
      "round_series",
      "row_hash",
      "rows",
      "semi_anti_join",
      "serde-lazy",
      "string_encoding",
      "string_normalize",
      "string_reverse",
      "string_to_integer",
      "string_pad",
      "strings",
      "temporal",
      "to_dummies",
      "true_div",
      "unique_counts",
      "zip_with",
      "cov",
      # polars-python/operations
      "approx_unique",
      "array_any_all",
      "array_count",
      "bitwise",
      "is_in",
      "repeat_by",
      "trigonometry",
      "sign",
      "performant",
      "list_gather",
      "list_filter",
      "list_count",
      "list_sets",
      "list_any_all",
      "list_drop_nulls",
      "list_sample",
      "cutqcut",
      "rle",
      "extract_groups",
      "pivot",
      "extract_jsonpath",
      "asof_join",
      "cross_join",
      "pct_change",
      "index_of",
      "search_sorted",
      "merge_sorted",
      "top_k",
      "propagate_nans",
      "timezones",
      "peaks",
      "hist",
      "find_many",
      "string_normalize",
  ], optional = true }    
  polars-plan = { version = "=0.50.0", features = ["ffi_plugin", "python"], optional = true }
  polars-utils = { version = "=0.50.0", optional = true }
  
  # matches the version specified in Polars: 
  #   https://github.com/pola-rs/polars/blob/main/Cargo.toml
  chrono = { version = "0.4.31", default-features = false, features = ["std"], optional = true }
  
  polars-arrow = { version = "=0.50.0", optional = true }
  pyo3 = { version = "0.25", features = ["abi3-py310"], optional = true }
  pyo3-polars = { version = "=0.23.1", features = ["derive", "dtype-array", "dtype-categorical", "dtype-struct", "lazy"], optional = true }
  serde = { version = "1.0", optional = true }
  serde-pickle = { version = "1.1", optional = true }
  
  lazy_static = { version = "1.4.0", optional = true }
  
  [build-dependencies]
  opendp_tooling = { path = "opendp_tooling", optional = true, version = "0.14.1-dev" }
  syn = { workspace = true, optional = true }
  proc-macro2 = { workspace = true, optional = true }
  cbindgen = { version = "0.28.0", optional = true }
  pyo3-build-config = { version = "0.25", optional = true }
  
  [features]
  default = ["partials", "use-openssl", "extension-module"]
  
  floating-point = []
  contrib = []
  honest-but-curious = []
  untrusted = ["floating-point", "contrib", "honest-but-curious"]
  
  polars = [
      "dep:polars",
      "polars-plan",
      "polars-arrow",
      "pyo3",
      "pyo3-polars",
      "serde",
      "serde-pickle",
      "chrono",
      "polars-utils"
  ]
  use-openssl = ["openssl"]
  
  # include extern "C" functions in cdylib
  ffi = ["lazy_static", "cbindgen"]
  # execute proc macros to insert proof links
  derive = ["opendp_tooling", "opendp_derive/full", "syn", "proc-macro2"]
  
  # extension-module necessary to remove requirement to statically link to libpython
  # but can't be default because it interferes with testing
  extension-module = ["pyo3/extension-module"]
  
  # generate language bindings
  bindings = ["ffi", "derive", "extension-module", "pyo3-build-config"]
  
  # generate "then_xxx" functions in Rust for "make_xxx" functions whose first two arguments are the metric space
  partials = ["derive", "opendp_derive/partials"]
  
  [lib]
  crate-type = ["rlib", "cdylib", "staticlib"]
  
  [package.metadata.docs.rs]
  no-default-features = true
  features = ["use-openssl", "derive", "untrusted", "polars"]
  rustdoc-args = [
      # so that latex renders
      "--html-in-header", "katex.html",
      
      # so that proof documents are visible
      "--document-private-items"
  ]
  