# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.89"
name = "cedar-policy-core"
version = "4.8.2"
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Core implementation of the Cedar policy language"
homepage = "https://cedarpolicy.com"
readme = "README.md"
keywords = [
    "cedar",
    "authorization",
    "policy",
    "security",
]
categories = [
    "compilers",
    "config",
]
license = "Apache-2.0"
repository = "https://github.com/cedar-policy/cedar"

[features]
arbitrary = ["dep:arbitrary"]
datetime = ["dep:chrono"]
decimal = []
default = [
    "ipaddr",
    "decimal",
    "datetime",
]
entity-manifest = []
experimental = [
    "tpe",
    "tolerant-ast",
    "extended-schema",
    "entity-manifest",
    "partial-validate",
    "partial-eval",
    "variadic-is-in-range",
]
extended-schema = []
ipaddr = []
partial-eval = []
partial-validate = []
test-util = []
tolerant-ast = []
tpe = []
variadic-is-in-range = []
wasm = [
    "serde-wasm-bindgen",
    "tsify",
    "wasm-bindgen",
]

[lib]
name = "cedar_policy_core"
path = "src/lib.rs"

[dependencies.arbitrary]
version = "1"
features = ["derive"]
optional = true

[dependencies.chrono]
version = "0.4.42"
optional = true
default-features = false

[dependencies.educe]
version = "0.6.0"

[dependencies.either]
version = "1.15"

[dependencies.itertools]
version = "0.14"

[dependencies.lalrpop-util]
version = "0.22.2"
features = ["lexer"]

[dependencies.linked-hash-map]
version = "0.5.6"
features = ["serde_impl"]

[dependencies.linked_hash_set]
version = "0.1.6"

[dependencies.miette]
version = "7.6.0"
features = ["serde"]

[dependencies.nonempty]
version = "0.12.0"
features = ["serialize"]

[dependencies.ref-cast]
version = "1.0"

[dependencies.regex]
version = "1.12"
features = ["unicode"]

[dependencies.rustc_lexer]
version = "0.1"

[dependencies.serde]
version = "1.0"
features = [
    "derive",
    "rc",
]

[dependencies.serde-wasm-bindgen]
version = "0.6"
optional = true

[dependencies.serde_json]
version = "1.0"
features = ["preserve_order"]

[dependencies.serde_with]
version = "3.16"
features = ["json"]

[dependencies.smol_str]
version = "0.3"
features = ["serde"]

[dependencies.stacker]
version = "0.1.22"

[dependencies.thiserror]
version = "2.0"

[dependencies.tsify]
version = "0.4.5"
optional = true

[dependencies.unicode-security]
version = "0.1.0"

[dependencies.wasm-bindgen]
version = "0.2.97"
optional = true

[dev-dependencies.cool_asserts]
version = "2.0"

[dev-dependencies.miette]
version = "7.6.0"
features = ["fancy"]

[dev-dependencies.similar-asserts]
version = "1.7.0"

[build-dependencies.lalrpop]
version = "0.22.2"

[lints.clippy]
cast_lossless = "warn"
cast_possible_truncation = "warn"
cloned_instead_of_copied = "warn"
expect_used = "deny"
fallible_impl_from = "deny"
format_collect = "warn"
format_push_string = "warn"
implicit_clone = "warn"
inconsistent_struct_constructor = "warn"
indexing_slicing = "deny"
inefficient_to_string = "warn"
large_enum_variant = "allow"
large_types_passed_by_value = "warn"
missing_const_for_fn = "allow"
needless_doctest_main = "allow"
needless_pass_by_value = "warn"
option_as_ref_cloned = "warn"
option_if_let_else = "allow"
option_option = "warn"
panic = "deny"
redundant_clone = "deny"
redundant_pub_crate = "allow"
ref_option = "warn"
ref_option_ref = "warn"
result_large_err = "allow"
todo = "deny"
too_long_first_doc_paragraph = "allow"
trivially_copy_pass_by_ref = "warn"
unimplemented = "deny"
unreachable = "deny"
unwrap_used = "deny"
use_self = "allow"

[lints.clippy.nursery]
level = "warn"
priority = -1

[lints.rust]
missing_debug_implementations = "deny"
rust-2018-idioms = "deny"
unsafe_code = "forbid"

[lints.rust.unexpected_cfgs]
level = "deny"
priority = 0
check-cfg = [
    "cfg(kani)",
    "cfg(fuzzing)",
]
