spg-engine 7.37.21

Execution engine for SPG: glues spg-sql parsing to spg-storage. Foreign keys, joins, vectors, cold tier.
Documentation
[package]
name         = "spg-engine"
version      = { workspace = true }
edition      = { workspace = true }
authors      = { workspace = true }
license      = { workspace = true }
description  = "Execution engine for SPG: glues spg-sql parsing to spg-storage. Foreign keys, joins, vectors, cold tier."
repository   = { workspace = true }
categories   = ["database-implementations"]
keywords     = ["spg", "sql", "engine", "executor", "no-std"]

[dependencies]
hashbrown    = { workspace = true }
spg-crypto  = { workspace = true }
spg-sql     = { workspace = true }
spg-storage = { workspace = true }
# v7.37.42-arena Phase 2 — per-query Bump arena for the SCALARSQ
# streaming executor's row scratch + projection buffer. Keeps the
# Vec<Value> outer alloc off the heap and bulk-resets at query end.
bumpalo     = { workspace = true }
# v7.17.0 Phase 3.P0-71 — `mysql_native_password` auth verifier
# stores SHA1(SHA1(password)) per user. RustCrypto's `sha1` is
# the smallest dep that lands a no_std-friendly SHA-1 in the
# workspace.
sha1        = { version = "0.10", default-features = false }
# v7.17.0 Phase 3.P0-72 — `caching_sha2_password` auth verifier
# stores SHA256(SHA256(password)) per user.
sha2        = { version = "0.10", default-features = false }
# v7.37.17 (17.6 siblings) — PG built-in md5() function. RustCrypto's
# `md-5` is the standard no_std-friendly MD5 impl; already in the
# lock graph transitively (via `sqlx-postgres` etc.), so no new
# vendored surface — just a direct dep now.
md-5        = { version = "0.10", default-features = false }
# v7.37.17 (17.6 siblings) — pgcrypto's hmac(data, key, algo) —
# uses RustCrypto's `hmac` (already transitively in the lock graph
# via sqlx-postgres) with the sha1/sha2/md-5 backends we ship.
hmac        = { version = "0.12", default-features = false }
# v7.37.17 (17.6 siblings) — trig + advanced math functions.
# `libm` is pure-Rust no_std C math library port, already
# transitively in the workspace via wasmtime/other crates.
libm        = { version = "0.2", default-features = false }
# v7.37.17 (17.6 siblings) — PG 13+ normalize(text, form) Unicode
# normalization. Already transitively in the lock graph.
unicode-normalization = { version = "0.1", default-features = false }
icu_collator = { workspace = true }
icu_locale_core = { workspace = true }

[features]
# v7.38 元机制 D — `std` feature gates `EnvConfig::from_env()` so the
# engine stays `#![no_std]`-compatible. Default-on for the hosted
# embedders (spg-server, spg-embedded, tests); downstream bare-metal
# users can opt out via `default-features = false`.
default = ["std"]
std     = []

# v7.37.16 — the in-place MVCC write path is ON BY DEFAULT (the
# v7.37.15 gate flipped after the full evidence chain: both engine
# matrices green, gate-on full gate ×2, DELETE beats PG18, autovacuum
# landed). This feature builds with the LEGACY physical-delete path as
# the default instead — the regression matrix for the old behaviour
# (`cargo test -p spg-engine --features mvcc-inplace-off`). Runtime
# opt-out for operators: `SPG_MVCC_INPLACE=0`.
mvcc-inplace-off = []

# v7.38 P0 元机制 A — injection_points framework.
#
# Default OFF for release builds: every `injection_point!()` macro
# call expands to `let _ = (...);` (consumes the payload exprs but
# generates no runtime code; verified by `cargo asm` to leave no
# push/pop/branch in optimised builds). With the feature ON the
# macro routes to `testkit::injection::__trigger`, which looks up
# the current engine's `InjectionStore` via a thread-local and runs
# the attached action (wait/wakeup/error/notice). Test binaries
# enable it via dev-deps; CI runs `cargo test --features
# injection-points`. See `.claude/notes/v7.38-injection-points-design.md`.
injection-points = []

# v7.37.9 T3 — diagnostic perf counters for Step VM / aggregate hot
# paths. Default OFF for release builds: every `bump_counter!(...)`
# macro call expands to `let _ = (...);` (no runtime code). With the
# feature ON the macro routes to the underlying `AtomicU64::fetch_add`.
# Used by the `xtests/dogfood_replay/src/bin/counter_dump.rs`
# diagnostic binary to attribute Class A / B / C cascade cost; not
# useful in production where the counters add ~3-4 ms/query overhead
# (3.5M atomic Relaxed adds × ~1 ns).
perf-counters = []

[lints]
workspace = true

[dev-dependencies]
# v7.39 (tz epic) — the e2e suite injects the std-side tzdb the way
# the server/embedded hosts do.
spg-tzif = { workspace = true }
criterion = { workspace = true }
# v7.38 P0 元机制 A — dev-cycle `cargo test` automatically opts in
# to the injection-points framework so unit / e2e tests can attach
# `wait` / `wakeup` / `error` / `notice` actions to any
# `injection_point!()` site. Release builds (no dev-deps) keep the
# feature off; macros expand to no-ops.
spg-engine = { path = ".", features = ["injection-points"] }

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