rete-core 0.3.2

Core format types for the Rete cloud-native RDF graph file.
Documentation
[package]
name = "rete-core"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
rust-version.workspace = true
description = "Core format types for the Rete cloud-native RDF graph file."
documentation = "https://docs.rs/rete-core"
readme = "README.md"
keywords = ["rdf", "sparql", "graph", "database", "range-queries"]
categories = ["database", "data-structures", "web-programming"]
publish = ["crates-io"]
include = ["src/**", "tests/**", "examples/**", "Cargo.toml", "README.md", "LICENSE"]

# docs.rs builds default features only, which would hide the `parallel` module.
# The builder is native Linux with a C toolchain, so `compression` + `rayon`
# both build there.
[package.metadata.docs.rs]
all-features = true

[dependencies]
thiserror.workspace = true
oxrdf.workspace = true
oxttl.workspace = true
oxrdfxml.workspace = true
spargebra.workspace = true
serde_json.workspace = true
blake3.workspace = true
# Pure-Rust zstd *decoder* — always available (incl. wasm). Encoding uses the
# faster C `zstd` below when the `compression` feature is on.
ruzstd = "0.7"
# Tiny pure-Rust regex engine for SPARQL `REGEX(...)` — `regex-lite` keeps the
# wasm small (no SIMD/aho-corasick), unlike the full `regex` crate.
regex-lite = "0.1"
# Pure-Rust hashes for the SPARQL hash built-ins (MD5/SHA1/SHA2 family). All
# RustCrypto, no C, so they compile to wasm too.
md-5 = "0.10"
sha1 = "0.10"
sha2 = "0.10"
# Randomness for the SPARQL RAND/UUID/STRUUID/BNODE built-ins. On
# wasm32-unknown-unknown getrandom has no default backend: a *browser* consumer
# turns on the `wasm-js` feature below (crypto.getRandomValues); a non-browser
# wasm host (Chicory/WASI/Wasmtime) must supply its own via getrandom's `custom`
# backend. Native targets use the OS backend and need neither.
getrandom = "0.2"
zstd = { workspace = true, optional = true }
# Data-parallel query evaluator (prototype). Behind the `parallel` feature so it
# is never pulled into wasm (the wasm crate builds with --no-default-features).
rayon = { version = "1", optional = true }

[dev-dependencies]
# Property-based testing (tests only — never shipped, so the dep weight and the
# transitive `rand` are fine here). Generates random graphs/queries and shrinks
# any counterexample to a minimal failing case — the SQLite-style invariant net.
proptest = "1"

[features]
default = ["compression"]
# zstd needs a C toolchain; disable for targets that lack one (e.g. wasm).
compression = ["dep:zstd"]
# Prototype data-parallel query evaluator. NOT default; wasm must never enable it
# (wasm has no threads). Enables the `parallel` module + `rayon`.
parallel = ["dep:rayon"]
# getrandom's browser backend (crypto.getRandomValues, via js-sys/wasm-bindgen).
# Enable ONLY for a wasm build that runs in a browser — it makes the module
# import wasm-bindgen JS glue, which a non-browser wasm host (Chicory on the JVM,
# WASI) cannot link. Those hosts leave this off and register a `custom` backend.
wasm-js = ["getrandom/js"]

# The parallel benchmark only compiles with the `parallel` feature (it uses
# rayon + the feature-gated `parallel` module). Without the gate, a default
# `cargo build --examples` would try to build it and fail.
[[example]]
name = "parallel_bench"
required-features = ["parallel"]