cedar-policy 3.2.0

Cedar is a language for defining permissions as policies, which describe who should have access to what.
Documentation
[package]
name = "cedar-policy"
edition = "2021"
rust-version = "1.76.0" # minimum supported Rust version is currently 1.76.0 because `cedar-policy-core` requirement. Check with `cargo install cargo-msrv && cargo msrv --min 1.75.0`

version = "3.2.0"
license = "Apache-2.0"
categories = ["compilers", "config"]
description = "Cedar is a language for defining permissions as policies, which describe who should have access to what."
keywords = ["cedar", "authorization", "policy", "security"]
homepage = "https://cedarpolicy.com"
repository = "https://github.com/cedar-policy/cedar"

[dependencies]
cedar-policy-core = { version = "=3.2.0", path = "../cedar-policy-core" }
cedar-policy-validator = { version = "=3.2.0", path = "../cedar-policy-validator" }
ref-cast = "1.0"
serde = { version = "1.0", features = ["derive", "rc"] }
serde_json = "1.0"
lalrpop-util = { version = "0.20.0", features = ["lexer"] }
itertools = "0.12"
miette = "7.1.0"
thiserror = "1.0"
smol_str = { version = "0.2", features = ["serde"] }
dhat = { version = "0.3.2", optional = true }
serde_with = "3.3.0"
nonempty = "0.10"

# wasm dependencies
serde-wasm-bindgen = { version = "0.6", optional = true }
tsify = { version = "0.4.5", optional = true }
wasm-bindgen = { version = "0.2.82", optional = true }

[features]
# by default, enable all Cedar extensions, but not other crate features
default = ["ipaddr", "decimal"]

# Cedar extensions
ipaddr = ["cedar-policy-core/ipaddr", "cedar-policy-validator/ipaddr"]
decimal = ["cedar-policy-core/decimal", "cedar-policy-validator/decimal"]

# Features for memory or runtime profiling
heap-profiling = ["dep:dhat"]
corpus-timing = []

integration_testing = []

# Experimental features.
# Enable all experimental features with `cargo build --features "experimental"`
experimental = ["partial-eval", "permissive-validate", "partial-validate"]
partial-eval = ["cedar-policy-core/partial-eval"]
permissive-validate = []
partial-validate = ["cedar-policy-validator/partial-validate"]
wasm = ["serde-wasm-bindgen", "tsify", "wasm-bindgen"]

[lib]
# cdylib required for wasm
crate_type = ["rlib", "cdylib"]

[dev-dependencies]
# Hack to enable the `integration_testing` feature for the `Cedar` integration
# tests without enabling it by default for ordinary consumers of `Cedar`. The
# `default-features = false` stops this dependency from forcibly enabling the
# default features of `Cedar`, leaving the default features to be controlled by
# the ordinary `--no-default-features` flag of `cargo test`. See
# https://github.com/rust-lang/cargo/issues/2911#issuecomment-1483256987 for
# more information. That issue also tracks a real solution to the problem that
# could replace this hack.
cedar-policy = { path = ".", default-features = false, features = [
    "integration_testing",
] }
cool_asserts = "2.0"
criterion = "0.5"
globset = "0.4"

proptest = "1.0.0"

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

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