Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/skade

skade-flight/Cargo.toml

# skade-flight — skade REMOTE: the standalone SQL door onto a skade warehouse.
#
# WHY THIS CRATE EXISTS
# ---------------------
# Power BI, the Arrow Flight SQL ODBC driver, ADBC (`adbc_driver_flightsql`),
# DataFusion and every other generic Flight SQL client speak SQL. knut's
# graphar-flight speaks Cypher over the same wire and is the wrong dialect to
# bend. This crate is the SQL dialect: DataFusion 55 over the skade Iceberg
# warehouse, Arrow out, streamed.
#
# It is the "skade remote" the workspace decided on ("skade = ONE impl, config
# picks embedded | remote; no separate DataFusion backend — skade IS
# DataFusion"). Embedded callers link `skade` and query in-process; remote
# callers hit this server. skade-sql's session-builder moved in here and that
# crate is on its way out (its FOLDING-BACK condition fired 2026-08-23).
#
# Detached workspace, same pattern as ../skade, ../skade-sql and ../serve: the
# datafusion tree never enters the published skade-katalog manifest.
[package]
name = "skade-flight"
version = "0.1.0"
edition = "2024"
rust-version = "1.92"
description = "Apache Arrow Flight SQL server over a skade Iceberg warehouse — DataFusion SQL in, streamed Arrow out. The door Power BI / ODBC / ADBC clients connect to (skade remote)."
license = "Apache-2.0"
repository = "https://git.gunnar.rs/nordisk/skade"
readme = "README.md"
publish = true

[lib]
name = "skade_flight"
path = "src/lib.rs"

[[bin]]
name = "skade-flight"
path = "src/bin/skade-flight.rs"
required-features = ["bin"]

[features]
default = ["bin"]
# The binary: CLI + skidbladnir lifecycle door (--unit/--install/--uninstall/…).
# Library consumers (korp embedding the service on its own port) leave it off.
bin = ["dep:skidbladnir", "dep:anyhow"]
# TLS on the tonic listener (server cert, optional client-CA for mTLS).
tls = ["tonic/tls-ring"]
# Object-store warehouses (MinIO/S3) — reuses skade's own factory.
object-store = ["skade/rustfs", "skade/s3"]
# Serve an EXISTING Nessie lake: `skade::connect::NessieV2` (Nessie API v2,
# read-only; S3 via aegir, `ClientTls` on either leg) → `Engine::with_connector`.
nessie = ["skade/nessie"]
# Serve a lake behind an Iceberg REST catalog: `skade::connect::IcebergRest`
# (Nessie `/iceberg`, Polaris; `ClientTls` on either leg) → `Engine::with_connector`.
rest-catalog = ["skade/rest-catalog"]
# Test-matrix rows: every Flight SQL handler and every datatype-matrix cell
# emits one `functional_status` row (nornir-testmatrix). Compiled-out no-op
# otherwise, same shim as skade/nornir-flight.
testmatrix = ["dep:nornir-testmatrix", "nornir-testmatrix/testmatrix"]

[dependencies]
skade = { version = "0.7.0", path = "../skade", default-features = false }
iceberg = { package = "iceberg-arrow59", version = "0.11.0", path = "../vendor/iceberg-arrow59" }
iceberg-datafusion = { package = "iceberg-datafusion-arrow59", version = "0.11.0", path = "../vendor/iceberg-datafusion-arrow59" }
datafusion = "55"

arrow-array = "59"
arrow-schema = "59"
arrow-ipc = "59"
arrow-flight = { version = "59", features = ["flight-sql-experimental"] }
tonic = { version = "0.14", features = ["transport"] }
prost = "0.14"
bytes = "1"
futures = "0.3"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "signal", "fs"] }
async-trait = "0.1"
arc-swap = "1"
base64 = "0.23"
thiserror = "2"
# Statement handles are sealed envelopes (ticket.rs): XChaCha20-Poly1305 over
# the claims, key derived with SHA-256 from the bearer secret (or random per
# process). Pure Rust; sha2 and getrandom are already in the tree.
chacha20poly1305 = "0.11"
sha2 = "0.11"
getrandom = "0.4"

# The ONE bearer-token ladder + constant-time compare every nordisk server uses
# (flag → env → token file). No second auth implementation.
nornir-service = "0.1.9"
# The ONE Flight SQL door (Basic/bearer auth + the ODBC-safe handshake), shared
# with knut's graphar-flight.
nornir-flight = { version = "0.1.5", default-features = false }

# The ship — renders and installs the systemd unit. LAW: every nordisk service
# installs through its own `--install` door via skidbladnir, never a hand-copied
# binary or a hand-written drop-in.
skidbladnir = { version = "0.1.15", optional = true, default-features = false }
anyhow = { version = "1", optional = true }
nornir-testmatrix = { version = "0.2.8", optional = true, default-features = false }

[dev-dependencies]
futures = "0.3"
arrow-cast = "59"
arrow-select = "59"
nornir-testmatrix = { version = "0.2.8", default-features = false }
serde_json = "1"
# Self-signed cert for the TLS round-trip test (feature `tls`), pure Rust.
rcgen = "0.14"
# The nordisk bench envelope — `examples/flight_bench.rs` emits the SAME
# BenchResult JSONL every other nordisk bencher does.
nornir-bench = { version = "0.1", default-features = false }
tempfile = "3"
anyhow = "1"
tokio = { version = "1", features = ["full"] }
# TPC-H over the Flight SQL door (`tests/tpch_flight_sql.rs`): the harness is
# bench's `tpch_shared.rs` by `#[path]` inclusion — one query text, one ingest —
# so these are exactly bench's TPC-H dev-deps (tpchgen-arrow 3.0 is arrow-59, no
# bridge — see bench/Cargo.toml).
skade-katalog = { path = "..", version = "0.2.0", features = ["s3"] }
# Live Nessie arms (`tests/nessie_live.rs`): the containers come up through
# bench's ZERO-SHELL manager, included by `#[path]` exactly as the TPC-H test
# includes `tpch_shared.rs` — one container path, not a second. These are its
# deps, same paths and features as bench/Cargo.toml.
jera = { path = "../../edda/crates/jera", features = ["container-oci"] }
draupnir = { path = "../../draupnir", features = ["backend-oci"] }
ureq = { version = "3", features = ["json"] }
parquet = "59"
tpchgen = "3.0.0"
tpchgen-arrow = "3.0.0"

[workspace]