rete-cli 0.4.2

CLI to build and inspect Rete graph files.
[package]
name = "rete-cli"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
rust-version.workspace = true
description = "CLI to build and inspect Rete graph files."
documentation = "https://docs.rs/rete-cli"
readme = "README.md"
keywords = ["rdf", "sparql", "cli", "graph"]
categories = ["command-line-utilities", "database"]
publish = ["crates-io"]
include = ["src/**", "tests/**", "build.rs", "Cargo.toml", "README.md", "LICENSE"]

[[bin]]
name = "rete"
path = "src/main.rs"

[dependencies]
# The CLI is always native, so it enables rete-core's `parallel` (rayon) feature
# to back `rete reach --parallel`, and `http` for the shared HTTP(S) range
# reader. (wasm builds rete-core without either.)
rete-core = { version = "=0.4.2", path = "../rete-core", features = ["parallel", "http"] }
anyhow.workspace = true
clap.workspace = true
clap_complete = "4"
clap_mangen = "0.2"
thiserror.workspace = true
# Turtle parsing for `rete build *.ttl`.
oxttl.workspace = true
# Transparent gzip on build inputs (`*.ttl.gz`, `*.nt.gz`, `*.trig.gz`) — the
# form every large public RDF dump ships in. Pure Rust (miniz_oxide), so it adds
# no C toolchain requirement; `MultiGzDecoder` also handles the concatenated
# members that `cat a.gz b.gz` produces.
flate2 = "1"
# Streaming zstd ENCODER for `rete export --compress zstd`. Already a workspace
# dependency (rete-core reads zstd-framed `.rete` sections with it), and the CLI
# is always native, so the C toolchain it needs is always present. rete-core
# keeps it behind its optional `compression` feature precisely so the wasm build
# can drop it; nothing here changes that split.
zstd = { workspace = true }
# Standard SPARQL Results JSON output + the Dataset Card schema (serde derive).
serde = { version = "1", features = ["derive"] }
serde_json.workspace = true
# Blocking HTTP(S) for range requests. The `tls` feature pulls rustls +
# webpki-roots (pure-Rust, no system OpenSSL) so `query-url`/`summary-url` work
# against https hosts — S3, GitHub, any CDN — which is the actual deployment story.
ureq = { version = "2", default-features = false, features = ["tls"] }
# `rete serve` — the minimal synchronous HTTP server behind the SPARQL endpoint
# (no async runtime; the engine is synchronous anyway).
tiny_http = "0.12"
# Graceful Ctrl-C shutdown for `rete serve` (also flushes coverage/profiling data).
ctrlc = "3"
# SPARQL *Update* parsing for `rete serve` (queries go through rete-core).
spargebra.workspace = true
# BLAKE3 of each build input, hashed while it streams (the build record). Already
# in the tree: rete-core's content hash is BLAKE3.
blake3.workspace = true

# `--progress=bar` routes stderr through a pipe so the build's own lines print
# above the bar, and asks the terminal its width: dup/dup2/pipe/poll and the
# window size, through rustix's safe wrappers (no `unsafe` in the CLI). Already
# in the lock (via tempfile); Unix only — elsewhere the bar is drawn without
# the pipe.
[target.'cfg(unix)'.dependencies]
rustix = { version = "1.1", default-features = false, features = ["std", "event", "pipe", "stdio", "termios"] }

[dev-dependencies]
assert_cmd = "2.0"
predicates = "3.1"
tempfile = "3.20"
serde_json.workspace = true

# jemalloc as the global allocator wherever it builds (not MSVC). A bounded
# `rete export` churns millions of decoded chunk bodies through an LRU cache;
# glibc malloc could not return the freed space (allocations of every size
# share its arenas), so peak RSS ran to 1.75x `--memory-budget-mb` on a
# 14.75 GiB file while the live heap stayed within it. jemalloc's size-class
# segregation and timed purging keep RSS at the live heap. Pinned exactly:
# allocator behavior is what the export memory bound is measured against.
# See docs/cli.md (`--memory-budget-mb`) and src/main.rs.
[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = "=0.6.1"