enprot 0.5.13

Engyon Protected Text (EPT) — confidentiality processor and capability ledger
[package]
name        = "enprot"
version     = "0.5.13"
authors     = ["Ribose Inc. <open.source@ribose.com>"]
license     = "BSD-2-Clause"
description = "Engyon Protected Text (EPT) — confidentiality processor and capability ledger"
repository  = "https://github.com/engyon/enprot"
homepage    = "https://github.com/engyon/enprot"
documentation = "https://docs.rs/enprot"
readme      = "README.md"
categories  = ["command-line-utilities", "cryptography"]
keywords    = ["encryption", "engyon", "ept", "botan", "blockchain"]
edition     = "2024"
rust-version = "1.88"
autotests   = false

[workspace]
members = [".", "enprot-ffi"]
default-members = [".", "enprot-ffi"]
resolver = "2"

[package.metadata.docs.rs]
# Build all features so docs.rs shows the full API surface.
all-features = true
# docs.rs runs `cargo doc` — pass --cfg docsrs so feature-gated
# items render with the standard "Available on feature=... only"
# badge once we add feature flags. Botan requires pkg-config at
# doc-build time; docs.rs installs it via the [package.metadata.docs.rs]
# `dependencies` field below (no-op until we need extra system libs).
rustdoc-args = ["--cfg", "docsrs"]

[features]
default = ["cli"]
cli = ["dep:clap", "dep:clap_complete"]
# Build librnp + json-c + sexpp from source via rnp-src. Use this in
# CI and deploy for self-contained builds that don't need
# system-installed librnp. For local dev, the default (system
# librnp) is faster.
vendored-rnp = ["rnp-rs/vendored"]

[lib]
crate-type = ["rlib"]

[[bin]]
name = "enprot"
path = "src/main.rs"
required-features = ["cli"]

[[test]]
name = "integration"
path = "tests/tests.rs"

[dependencies]
hex            = "0.4"
rpassword      = "7"
clap           = { version = "4.5", features = ["derive", "wrap_help"], optional = true }
clap_complete  = { version = "4", optional = true }
phf            = { version = "0.14", features = ["macros"] }
thiserror      = "2"
serde          = { version = "1", features = ["derive"] }
serde_json     = "1"
toml           = "1.1"
# Botan does not implement AES-GCM-SIV (RFC 8452). The RustCrypto crate
# remains the backend for `aes-256-gcm-siv`; the other ciphers route through
# Botan.
aes-gcm-siv    = "0.11"
zeroize        = { version = "1", features = ["alloc"] }
# OpenPGP signature support via librnp (the OpenPGP C library from
# Ribose). rnp-rs 0.1.10 + the `vendored` feature uses rnp-src to
# build librnp + json-c + sexpp from source — eliminates the need
# for system-installed librnp/json-c/bzip2/zlib in CI and deploy.
# The `vendored-rnp` feature below exposes this as a build-time opt-in.
rnp-rs         = "0.1.10"

# botan-sys unconditionally calls `pkg-config` when its `pkg-config`
# feature is on. Windows runners don't ship pkg-config. Split per
# target:
#   - Unix: keep `pkg-config` for fast system-Botan discovery.
#   - Windows: use `vendored` so botan-src builds Botan from source.
#     Combined with vendored-rnp, Windows CI needs ZERO system C deps.
[target.'cfg(not(windows))'.dependencies]
botan          = { version = "0.11", features = ["botan3", "pkg-config"] }

[target.'cfg(windows)'.dependencies]
botan          = { version = "0.11", default-features = false, features = ["botan3", "static"] }

[dev-dependencies]
tempfile    = "3"
assert_cmd  = "2"
predicates  = "3"
cpu-time    = "1.0"
proptest    = "1"
serde_json  = "1"
criterion   = { version = "0.8", features = ["html_reports"] }
clap_mangen = "0.3"

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

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

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

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

[[test]]
name = "proptest_roundtrip"
path = "tests/proptest_roundtrip.rs"

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true
# Reproducible builds (TODO.completion/12). Abort-on-panic keeps
# binaries free of unwind tables that vary by build env; debug
# symbols limited to line tables (no full paths embedded).
panic = "abort"
debug = "line-tables-only"

[profile.release.package."*"]
# Strip build-env-specific debug info from dependencies too.
debug = "line-tables-only"