72 lines
1.8 KiB
TOML
Executable File
72 lines
1.8 KiB
TOML
Executable File
[package]
|
|
name = "corbel-purge"
|
|
version = "0.4.2"
|
|
edition = "2021"
|
|
description = "Strict Rust secure document sanitizer & threat neutralizer for PDF, EPUB, Markdown, and DOCX"
|
|
license = "GPL-3.0-or-later"
|
|
authors = ["Jeremy Anderson"]
|
|
repository = "https://git.dcos.net/dcosnet/corbel"
|
|
homepage = "https://git.dcos.net/dcosnet/corbel"
|
|
|
|
[[bin]]
|
|
name = "corbel-purge"
|
|
path = "src/main.rs"
|
|
|
|
[[bin]]
|
|
name = "corbel-purge-gui"
|
|
path = "src/bin/gui.rs"
|
|
required-features = ["gui"]
|
|
|
|
[lib]
|
|
name = "corbel_purge"
|
|
path = "src/lib.rs"
|
|
|
|
[features]
|
|
default = []
|
|
# Enable the iced GUI binary. When disabled, the crate compiles as a headless
|
|
# CLI + library only — useful for CI and server-side scanning pipelines.
|
|
gui = ["dep:iced", "dep:rfd", "dep:tokio"]
|
|
|
|
[dependencies]
|
|
# --- PDF structure inspection ---
|
|
lopdf = "0.34"
|
|
|
|
# --- EPUB (ZIP container) inspection ---
|
|
# Using `zip` directly gives us byte-level control over the EPUB container,
|
|
# which the security scanner needs (we have to inspect raw stream bytes
|
|
# inside each ZIP entry, not just rendered XHTML).
|
|
zip = "2"
|
|
|
|
# --- Markdown parsing ---
|
|
pulldown-cmark = { version = "0.12", default-features = false }
|
|
|
|
# --- Quarantine packaging ---
|
|
tar = "0.4"
|
|
flate2 = "1"
|
|
|
|
# --- Serialization & hashing ---
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
sha2 = "0.10"
|
|
hex = "0.4"
|
|
|
|
# --- Misc utilities ---
|
|
thiserror = "2"
|
|
regex = "1"
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
|
|
# --- Optional GUI (iced) ---
|
|
iced = { version = "0.13", optional = true, features = ["tokio", "debug"] }
|
|
rfd = { version = "0.15", optional = true }
|
|
tokio = { version = "1", optional = true, features = ["rt-multi-thread", "macros", "fs"] }
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|
|
pretty_assertions = "1"
|
|
|
|
[profile.release]
|
|
opt-level = 3
|
|
lto = "thin"
|
|
codegen-units = 1
|
|
strip = "symbols"
|