crates/nornir-funnel-embed/Cargo.toml
[package]
name = "nornir-funnel-embed"
version = "0.2.0"
edition = "2021"
description = "Backend-(2) native embed adapter: a THIN tonic gRPC client for nornir-server's read-only `Funnel.Show` RPC that reconstructs a `funnel_core::Funnel` client-side and renders it as the metric-bearing Plan-DAG (`facett-plandag`). Exposes `fn panel(endpoint) -> Box<dyn Panel>` so any egui host (dwarves-gui) can drop the live funnel into a tab — WITHOUT linking the `nornir` crate (that would be a dependency cycle). The reusable `<guest>-embed` shape from the panels design (holger-embed is the template)."
license = "MIT OR Apache-2.0"
repository = "https://git.gunnar.rs/nordisk/dwarves"
# PUBLISHABLE: this is a REAL (optional) dependency of the published `dwarves`
# crate (feature `funnel-action`). cargo publish does not honour `publish = false`
# for a dependency of a published crate — it would fail-stop the `dwarves` upload
# with "no matching package named nornir-funnel-embed". Its whole dep tree
# (funnel-core, facett-plandag, facett-core, egui, tonic, prost, serde…) is on
# crates.io / publishable, so this crate publishes cleanly on its own.
publish = true
# Development notes, agent instructions and machine-local tooling stay in the
# repository; they are not part of the published crate.
exclude = [
".nornir/",
]
[features]
# Record the pane's functional-status cells into the nornir test-matrix (via
# facett-core → edda nornir-testmatrix). OFF by default (emit is a no-op); the
# live-poll test records its cell under `cargo test --features testmatrix`.
testmatrix = ["facett-core/testmatrix"]
# `testkit` — expose a reusable MOCK `Funnel` gRPC server (`testkit::spawn_mock_funnel`:
# a real tonic server on an ephemeral port whose `SubmitIdea` grows an in-memory store
# `Show` then returns), so a host's robot tests can prove submit→visible over the REAL
# wire without twinning a tonic mock (L5 — it mounts through the warehouse testkit's
# ONE `spawn_router` body).
testkit = ["dep:nornir-warehouse-embed"]
[dependencies]
# The pure DAG core — reconstructed client-side from the Funnel.Show dump, then
# projected (PlanDag::from_funnel) for the renderer. No nornir dep (no cycle).
funnel-core = { path = "../../../funnel-core", version = "0.1.5" }
# The metric-bearing operator-DAG renderer (the funnel plan-DAG facet).
facett-plandag = { path = "../../../facett/facett-plandag", version = "0.2.0" }
# The SHARED vello-backed 2D graph ENGINE — the OTHER render of the funnel DAG: a
# node-link graph (the plan-DAG facet above is the card-lane render). Its own header
# calls it "a future drop-in for nornir's `draw_graph`". `graph.rs` is a domain adapter
# only — it lowers funnel-core's PlanDag to the engine's GraphModel and reuses the
# engine's DepGraphLayout + DecoratedGraphView verbatim (no second renderer).
facett-graphview = { path = "../../../facett/facett-graphview", version = "0.2.0" }
# The Panel/Facet seam (`panel()` returns `Box<dyn Panel>`).
facett-core = { path = "../../../facett/facett-core", version = "0.3.0" }
egui = "0.36"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
anyhow = "1"
chrono = { version = "0.4", features = ["serde"] }
# Thin gRPC client to nornir-server (+ `router` for the testkit's mock server —
# same pins as nornir-warehouse-embed).
tonic = { version = "0.14", default-features = false, features = ["router", "transport", "codegen"] }
prost = "0.14"
tonic-prost = "0.14"
# The SHARED service-token resolution ladder (env→file→open) — consumed, never
# twinned (Law #5). Lean leaf (tonic + constant_time_eq, both already in-graph here).
nornir-service = { path = "../../../edda/crates/nornir-service", version = "0.1.12" }
tokio = { version = "1", features = ["rt", "time"] }
# `testkit` only: the sibling embed's mock plumbing (`testkit::spawn_router` — the ONE
# ephemeral-port tonic spawn body, reused rather than twinned) + its `MockWarehouseServer`
# handle type. Optional, so the shipped pane's dep tree is unchanged.
nornir-warehouse-embed = { path = "../nornir-warehouse-embed", version = "0.2.0", features = ["testkit"], optional = true }
[build-dependencies]
tonic-prost-build = { version = "0.14" }
protox = "0.9"
[dev-dependencies]
egui_kittest = { version = "0.36", features = ["snapshot"] }