fabro/Cargo.toml
Bryan Helmkamp 6c43c8b34b Lazy-compile gitleaks regexes to eliminate startup cost
Replace eager Regex compilation in GitleaksEngine::build() with
OnceLock-based lazy compilation. Individual regexes (rule patterns,
allowlist patterns, global allowlist patterns) are now compiled on
first use rather than at startup. This drops dry-run time from ~1.4s
to ~0.5s since the common no-match path never compiles any regexes.

Also removes the warm_up() pre-loading function and its callers since
lazy compilation makes it unnecessary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 18:02:37 -05:00

46 lines
1.2 KiB
TOML

[workspace]
members = ["crates/*"]
resolver = "2"
[workspace.package]
edition = "2021"
version = "0.1.0"
license = "MIT"
[workspace.dependencies]
anyhow = "1"
thiserror = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1", features = ["full"] }
reqwest = { version = "0.12", default-features = false, features = ["json", "stream", "rustls-tls"] }
uuid = { version = "1", features = ["v4"] }
rand = "0.8"
dotenvy = "0.15"
futures = "0.3"
tokio-stream = "0.1"
async-trait = "0.1"
base64 = "0.22"
bytes = "1"
tokio-util = "0.7"
clap = { version = "4", features = ["derive"] }
jsonschema = "0.42"
chrono = "0.4"
bollard = "0.18"
tar = "0.4"
dialoguer = "0.12"
git2 = "0.19"
walkdir = "2"
regex = "1"
aho-corasick = "1"
toml = "0.8"
daytona-sdk = { git = "https://github.com/brynary/daytona-sdk-rust", package = "daytona-sdk" }
daytona-api-client = { git = "https://github.com/brynary/daytona-sdk-rust", package = "daytona-api-client" }
# regex is extremely slow in debug builds (~10s to compile gitleaks patterns)
[profile.dev.package.regex]
opt-level = 2
[profile.dev.package.regex-automata]
opt-level = 2
[profile.dev.package.regex-syntax]
opt-level = 2