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

nordisk/knut

crates/graphar-flight/Cargo.toml

[package]
name = "graphar-flight"
description = "Apache Arrow Flight SQL service over FalkorDB — Cypher in, Arrow out"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
# Development notes, agent instructions and machine-local tooling stay in the
# repository; they are not part of the published crate.
exclude = [
    ".nornir/",
]

[features]
# The serve binary: CLI + skidbladnir lifecycle door (--unit/--install/…), the
# same shape as `skade-flight`. Library consumers (korp hosts this service on its
# own port) leave it off; a bare `git clone knut && cargo build -p graphar-flight`
# produces the server, which is the point — until 2026-09-10 this crate shipped
# NO Flight SQL binary and the only way to run it was to embed it.
default = ["bin"]
bin = ["dep:skidbladnir", "dep:nornir-service", "dep:anyhow"]
# `http` - graphar-graph-http: a few NAMED read queries over one graph, as Arrow IPC over plain
# HTTP for a browser (a wasm viewer cannot speak Flight's gRPC). No query text from the client.
http = ["dep:tiny_http", "dep:arrow-ipc"]
# Graph → Iceberg export via `skade` (the Apache Iceberg read/write stack, on
# arrow 59 / iceberg 0.9.1, from crates.io). OFF BY DEFAULT — pulls a heavy
# arrow-59/iceberg tree. knut and skade now share arrow 59 (one major), so the
# old C-Data-Interface FFI bridge is gone: the export path clones the batch
# directly (`skade::arrow_array::RecordBatch == arrow_array::RecordBatch`).
skade = [
    "dep:skade",
    "dep:tempfile",
]
# `testmatrix` — emit each functional surface's health (Flight SQL do_get /
# get_flight_info) into the nornir test-matrix via `functional_status`. OFF BY
# DEFAULT: a compiled-out `#[inline]` no-op with no nornir dep. Turn on with
# `--features testmatrix` (pulls nornir-testmatrix's own `testmatrix` mode).
testmatrix = ["dep:nornir-testmatrix", "nornir-testmatrix/testmatrix"]

[dependencies]
graphar = { path = "../graphar" , version = "0.3.0" }
graphar-falkordb = { path = "../graphar-falkordb" , version = "0.3.0" }

# Introspection-marker emitter — only compiled with `testmatrix`. Path dep (the
# workspace `[patch.crates-io]` also resolves it) to the local nornir-testmatrix
# ≥0.2 which carries `functional_status`.
nornir-testmatrix = { version = "0.2", default-features = false, optional = true }

# skade: Apache Iceberg writer/reader (arrow 59). Only compiled with the
# `skade` feature; `default-features = false` drops the SQL/datafusion surface
# (we just read/write). Pinned to 0.5 to match the sibling skade checkout the
# workspace `[patch.crates-io]` resolves it to (the equality-delete CDC surface).
skade = { version = "0.7.0", default-features = false, optional = true }
tempfile = { version = "3", optional = true }

arrow = { workspace = true }
arrow-array = { workspace = true }
arrow-schema = { workspace = true }
arrow-flight = { workspace = true }
tonic = { workspace = true }
futures = { workspace = true }
prost = { workspace = true }

# `tls-rustls` + `tokio-rustls-comp` add the rustls async TLS path so
# `FalkorExecutor::connect_with_identity` can build a `rediss://` mutual-TLS client
# (`redis::Client::build_with_tls`) that presents a thin client's vault-held client
# cert+key. Features are additive (they unify with the workspace `redis` def); the
# tokio-rustls copy is already in the lock, so this pulls no new heavy tree.
redis = { workspace = true, features = ["tls-rustls", "tokio-rustls-comp"] }
tiny_http = { version = "0.12", default-features = false, optional = true }
arrow-ipc = { version = "59", optional = true }
tokio = { workspace = true }
thiserror = { workspace = true }
serde_json = { workspace = true }
base64 = "0.23"
# The ONE Flight SQL door (Basic decoder, constant-time compare, the ODBC-safe
# handshake), shared with skade-flight. Registry version: builds from ONE clone.
nornir-flight = { version = "0.1.5", default-features = false }

# ── the serve binary only (feature `bin`) ──────────────────────────────────
# Registry versions, deliberately: this crate must build from ONE clone.
anyhow = { version = "1", optional = true }
# The ONE token ladder (`--token` → env → `~/.graphar-flight/token`).
nornir-service = { version = "0.1.9", optional = true }
# The ship — renders and installs the systemd unit. LAW: a nordisk service
# installs through its own `--install` door via skidbladnir.
skidbladnir = { version = "0.1.15", optional = true, default-features = false }

[dev-dependencies]
tokio = { workspace = true }
testcontainers = "0.27"
arrow-array = { workspace = true }
futures = { workspace = true }
tempfile = "3"

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

[[example]]
name = "export-iceberg"
required-features = ["skade"]

[[bin]]
name = "graphar-graph-http"
path = "src/bin/graphar-graph-http.rs"
required-features = ["http"]