cerberust 0.1.0

Fast Rust guardrails for LLM input/output — composable scanners (PII, secrets, prompt-injection) and streaming middleware.
Documentation
# 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.83"
name = "cerberust"
version = "0.1.0"
build = false
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Fast Rust guardrails for LLM input/output — composable scanners (PII, secrets, prompt-injection) and streaming middleware."
readme = "README.md"
keywords = [
    "llm",
    "guardrails",
    "pii",
    "security",
    "scanner",
]
categories = ["text-processing"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/taostat/cerberust"

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

[features]
prompt-injection = [
    "dep:ort",
    "dep:tokenizers",
]
wasm = [
    "dep:wasmtime",
    "dep:anyhow",
]

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

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

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

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

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

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

[[bench]]
name = "comparison"
path = "benches/comparison.rs"
harness = false

[dependencies.anyhow]
version = "1.0"
optional = true

[dependencies.hex]
version = "0.4"

[dependencies.hmac]
version = "0.12"

[dependencies.ort]
version = "2.0.0-rc.12"
features = [
    "std",
    "download-binaries",
    "tls-native",
]
optional = true
default-features = false

[dependencies.rand]
version = "0.8"

[dependencies.regex]
version = "1.11"

[dependencies.regex-automata]
version = "0.4"

[dependencies.sha2]
version = "0.10"

[dependencies.thiserror]
version = "2.0"

[dependencies.tokenizers]
version = "0.23"
features = ["onig"]
optional = true
default-features = false

[dependencies.wasmtime]
version = "44.0.3"
features = [
    "runtime",
    "component-model",
    "cranelift",
]
optional = true
default-features = false

[dependencies.zeroize]
version = "1.8"
features = ["derive"]

[dev-dependencies.proptest]
version = "1.6"

[lints.clippy]
allow_attributes = "deny"
dbg_macro = "deny"
exit = "deny"
expect_used = "warn"
mem_forget = "deny"
module_name_repetitions = "allow"
panic = "deny"
panic_in_result_fn = "deny"
print_stderr = "deny"
print_stdout = "deny"
similar_names = "allow"
todo = "deny"
unimplemented = "deny"
unwrap_used = "deny"

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