[package]
name = "kube-cel"
version = "0.4.0"
edition = "2024"
license = "Apache-2.0"
description = "Kubernetes CEL extension functions for the cel crate"
repository = "https://github.com/doxxx93/kube-cel"
documentation = "https://docs.rs/kube-cel"
keywords = ["kubernetes", "cel", "kube", "validation"]
categories = ["api-bindings"]

[dependencies]
cel = "0.12"
regex = { version = "1", optional = true }
url = { version = "2", optional = true }
ipnet = { version = "2", optional = true }
semver = { version = "1", optional = true }
base64 = { version = "0.22", optional = true }
serde = { version = "1", features = ["derive"], optional = true }
serde_json = { version = "1", optional = true }
chrono = { version = "0.4", default-features = false, features = ["alloc"], optional = true }

[lints.rust]
unsafe_code = "forbid"

[features]
default = ["strings", "lists", "sets", "regex_funcs", "urls", "ip", "semver_funcs", "format", "quantity", "jsonpatch", "named_format", "math", "encoders"]
strings = []
lists = []
sets = []
regex_funcs = ["dep:regex"]
urls = ["dep:url"]
ip = ["dep:ipnet"]
semver_funcs = ["dep:semver"]
format = []
quantity = []
jsonpatch = []
named_format = []
math = []
encoders = ["dep:base64"]
validation = ["dep:serde_json", "dep:serde", "dep:chrono"]

[[example]]
name = "basic"

[[example]]
name = "validate_crd"
required-features = ["validation"]

[[example]]
name = "compiled_schema"
required-features = ["validation"]

[[example]]
name = "timestamp_duration"
required-features = ["validation"]
