expr-lang 2.1.0

Implementation of expr language in Rust
Documentation
[package]
name = "expr-lang"
version = "2.1.0"
edition = "2024"
rust-version = "1.85"
authors = ["@jdx"]
license = "MIT"
documentation = "https://docs.rs/expr-lang"
homepage = "https://github.com/jdx/expr.rs"
repository = "https://github.com/jdx/expr.rs"
description = "Implementation of expr language in Rust"
include = [
    "/CHANGELOG.md",
    "/LICENSE",
    "/README.md",
    "/compat/cases.tsv",
    "/compat/errors.tsv",
    "/examples/**/*.rs",
    "/MIGRATION.md",
    "/src/**/*.pest",
    "/src/**/*.rs",
    "/tests/**/*.rs",
]

[features]
# Everything is on by default, so an existing dependent sees no change: the whole language is
# there unless it says otherwise. `default-features = false` is for an embedder that wants the
# evaluator and knows which builtins its expressions use — a CLI validating flag values does
# not need a timezone database.
default = ["base64", "json", "regex", "temporal"]

# `toBase64` / `fromBase64`.
base64 = ["dep:base64"]
# `fromJSON` / `toJSON`. Implies `base64`, which is how `toJSON` writes `Value::Bytes`.
json = ["dep:serde_json", "base64"]
# The `matches` operator.
regex = ["dep:regex"]
# Dates, durations, timezones, and their operators and methods: `now`, `date`, `duration`,
# `timezone`, and the `Value` variants they produce. Carries the regex crate because parsing
# a UTC offset uses it — that is not the `matches` operator, which `regex` is.
temporal = ["dep:chrono", "dep:chrono-tz", "dep:iana-time-zone", "dep:regex"]

# `chrono`/`chrono-tz` serde support belongs here rather than on the dependency lines: it
# pulled serde into every build that did not ask for serde at all.
serde = ["dep:serde", "indexmap/serde", "chrono?/serde", "chrono-tz?/serde"]

[lib]
name = "expr"

[dependencies]
base64 = { version = "0.23", optional = true }
chrono = { version = "0.4", optional = true }
chrono-tz = { version = "0.10", optional = true }
iana-time-zone = { version = "0.1", optional = true }
indexmap = "2"
regex = { version = "1", optional = true }
pest_derive = "2"
pest = "2"
log = "0.4"
serde = { version = "1.0", optional = true, features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"], optional = true }

[dev-dependencies]
test-log = "0.2"
proptest = "1"
serde = "1"
# For tests only, and unconditionally: `serde.rs`'s tests read JSON to build a `Value` to
# round-trip, which has nothing to do with whether the `json` builtins are compiled in.
serde_json = "1"

[profile.dev]
debug = 1