Ctrl K
ComunidadGuías…

apps/ingest/Cargo.toml

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
[package]
name = "maple-ingest"
version = "0.1.0"
edition = "2021"
default-run = "maple-ingest"

[dependencies]
axum = "0.8.8"
aes-gcm = "0.10"
async-trait = "0.1"
tikv-jemallocator = "0.6"
base64 = "0.22.1"
bytes = "1"
chrono = { version = "0.4.42", default-features = false, features = ["clock"] }
flate2 = "1.1.5"
futures-util = "0.3"
http-body-util = "0.1"
hmac = "0.12.1"
dotenvy = "0.15.7"
opentelemetry = "0.32"
opentelemetry-appender-tracing = "0.32"
opentelemetry_sdk = { version = "0.32", features = [
	"rt-tokio",
	"trace",
	"logs",
	"metrics",
	"experimental_trace_batch_span_processor_with_async_runtime",
	"experimental_metrics_periodicreader_with_async_runtime",
	"experimental_logs_batch_log_processor_with_async_runtime",
] }
opentelemetry-otlp = { version = "0.32", default-features = false, features = [
	"http-proto",
	"gzip-http",
	"reqwest-client",
	"reqwest-rustls",
	"trace",
	"logs",
	"metrics",
] }
opentelemetry-proto = { version = "0.32", features = ["gen-tonic", "trace", "logs", "metrics", "with-serde"] }
prost = "0.14.3"
# The `regex` crate's engine; ingest rules use it directly to read each regex's compiled size.
regex-automata = { version = "0.4.14", default-features = false, features = ["std", "syntax", "meta", "perf", "unicode", "hybrid", "nfa-backtrack"] }
crc32fast = "1.5"
dashmap = "6.1"
num_cpus = "1.17"
reqwest = { version = "0.13.2", default-features = false, features = ["rustls", "http2", "json"] }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.145"
sha2 = "0.10.9"
tokio = { version = "1.48.0", features = ["macros", "rt-multi-thread", "signal", "sync"] }
tonic = { version = "0.14", features = ["transport", "gzip"] }
tracing = "0.1.41"
tracing-opentelemetry = "0.33"
tracing-subscriber = { version = "0.3.20", features = ["fmt", "env-filter"] }
tower-http = { version = "0.6", features = ["cors"] }
url = "2.5.7"
uuid = { version = "1", features = ["v4"] }
moka = { version = "0.12", features = ["future"] }
# Postgres key store (INGEST_KEY_STORE_BACKEND=postgres): a pooled direct
# connection to PlanetScale Postgres (PSBouncer 6432, no Hyperdrive — Railway
# dials PlanetScale). TLS via rustls (ring provider; reqwest already pulls rustls).
tokio-postgres = "0.7"
deadpool-postgres = "0.14"
tokio-postgres-rustls = "0.13"
rustls = { version = "0.23", features = ["ring"] }
# RS256 signatures of the ID tokens Pub/Sub signs its GCP pushes with. Already
# in the tree through rustls.
ring = "0.17"
webpki-roots = "0.26"
# Opt-in profiler (https://hotpath.rs). Every macro is a no-op and no profiler
# code is compiled unless `--features hotpath` is passed; the `tokio` and
# `reqwest-0-13` features only exist so the `hotpath::wrap::*` type aliases
# resolve to the raw tokio/reqwest types in normal builds.
hotpath = { version = "0.23", features = ["tokio", "reqwest-0-13"] }

[features]
default = []
# `cargo run --features hotpath` prints a timing report on exit; add
# `hotpath-alloc` for allocation tracking (swaps in a counting allocator around
# jemalloc). Never enable by default — the report and metrics server cost real
# CPU on the request path.
hotpath = ["hotpath/hotpath"]
hotpath-alloc = ["hotpath/hotpath-alloc"]
# Exposes `ingest_rules::conformance` for the `ingest_rules_oracle` example.
conformance = []

[lints.rust]
unsafe_code = "deny"
missing_debug_implementations = "warn"
unreachable_pub = "warn"
unused_qualifications = "warn"

[lints.clippy]
# groups first, negative priority so specific lints below can override
pedantic = { level = "warn", priority = -1 }

# --- the agent-specific ones ---
allow_attributes = "deny" # forces #[expect] instead of #[allow]
allow_attributes_without_reason = "deny" # every suppression needs a justification
todo = "deny" # no todo!() left behind
unimplemented = "deny"
dbg_macro = "deny"
unwrap_used = "warn"
expect_used = "warn"
panic = "warn"
unwrap_in_result = "warn"
let_underscore_must_use = "warn"
mem_forget = "deny"

# --- clone / alloc slop ---
redundant_clone = "warn" # nursery
assigning_clones = "warn"
clone_on_ref_ptr = "warn"
str_to_string = "warn"
implicit_clone = "warn"

# --- structural slop ---
cognitive_complexity = "warn" # nursery
excessive_nesting = "warn"
unused_async = "warn" # nursery
unnecessary_wraps = "warn"
wildcard_imports = "warn"
use_self = "warn" # nursery

# --- pedantic noise to allow back ---
module_name_repetitions = "allow"
must_use_candidate = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
doc_markdown = "allow"
similar_names = "allow"
items_after_statements = "allow"

[dev-dependencies]
criterion = { version = "0.5", features = ["async_tokio"] }
proptest = { version = "1.10", default-features = false, features = ["std"] }

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

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

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

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

# Reads fixture-shaped cases as JSON lines on stdin and prints each outcome; driven by
# `bun run --cwd packages/ingest-rules fuzz` to diff this engine against the TS one.
[[example]]
name = "ingest_rules_oracle"
required-features = ["conformance"]