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

nordisk/facett

facett-graph3d/Cargo.toml

[package]
name = "facett-graph3d"
description = "facett — 3D graph viewer (sphere/helix layouts, Y-spin, depth cues); the 3D-callgraph idea, generic"
version.workspace = true
edition.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]
# `wgpu` turns on the GPU **extruded-logo** renderer (the depth-tested, lit
# `egui_wgpu` paint callback used for the 3D znippy rabbit). OFF by default: the
# CPU painter draws the lit mesh as depth-sorted shaded triangles, so a host with
# no wgpu RenderState still gets a real 3D logo. ON gives the host (facett-demo /
# korp) the GPU fast path with a real depth buffer.
default = []
# CONS-CORE Phase C: graph3d's LogoRenderer now folds into the shared L0
# offscreen colour+depth+blit helper (`facett-core/wgpu`) — the parity fold with
# facett-map3d. The CPU painter (the snapshot golden path) is unchanged.
wgpu = ["dep:egui-wgpu", "dep:wgpu", "dep:bytemuck", "dep:pollster", "facett-core/wgpu"]
# L4: functional-status emitter passthrough (see facett-core). No-op in release.
testmatrix = ["facett-core/testmatrix"]
# **EDGE-RATE overlay** -- the 3D sibling of facett-flow's `rate` feature: the
# consumer sets per-edge rates (one Option<f32> per edge, indexed like the edge
# list) and the injected animation clock (FC-7) drives PULSES travelling along a
# CURVED 3D arc per rated edge -- brighter/faster for a higher rate, nothing for
# None, zero behaviour change when the feature is off or no rates are set.
rate = []

[dependencies]
facett-core = { path = "../facett-core", version = "0.3.0" }
# znippy's fork-join **gatling** engine (`gatling_for_each`, one worker per core) —
# the SAME parallelism facett-core's Barnes–Hut + facett-graphnav's force layout use
# (L5 reuse; rayon is FORBIDDEN). Drives the per-frame node **projection** across
# every core so rotating a 30 000-node cloud no longer pegs ONE core. Index-order
# preserving ⇒ output byte-identical to the serial `.iter().map().collect()`.
znippy-zoomies = { path = "../../znippy-zoomies", version = "0.1.26" }
# facett-cfd's gatling-accelerated fluid solver — the FLUID the `SystemMap` skin
# flows through its glass pipes (L5 reuse: the fluid lives once in facett-cfd and is
# consumed here, never twinned). No cycle: facett-cfd does not depend on graph3d.
facett-cfd = { path = "../facett-cfd", version = "0.2.0" }
egui = { workspace = true }
serde = { version = "1", features = ["derive"] }
serde_json = { workspace = true }
# GPU logo deps (only compiled with the `wgpu` feature). Versions match the
# egui 0.34 stack (egui-wgpu 0.34 → wgpu 29), same as facett-map's GPU kernel
# and egui_kittest's wgpu backend.
# `default-features = false`: egui-wgpu's default list ends in `wgpu/webgl`, which
# compiles wgpu's WebGL2 backend (and `glow`) into every wasm surface that reaches
# this crate. facett renders on WebGPU (`preferred_backends()` is
# `Backends::BROWSER_WEBGPU` on wasm32), so that backend is unreachable dead weight
# in the browser download. Features are additive and unify across the graph, so it
# can only be kept out where it is switched on. The two defaults that carry weight
# are re-listed; `wgpu/default` comes from the direct `wgpu` dep below, so native
# Vulkan/Metal/DX12 are unchanged. See facett-core/Cargo.toml for the full rationale.
egui-wgpu = { version = "0.36", optional = true, default-features = false, features = [
    "fragile-send-sync-non-atomic-wasm",
    "macos-window-resize-jitter-fix",
] }
wgpu = { workspace = true, optional = true }
bytemuck = { version = "1", optional = true, features = ["derive"] }
# Headless GPU graph render-proof (T3.4): block on the offscreen adapter/device.
pollster = { version = "1", optional = true }

[dev-dependencies]
criterion = { version = "0.8", default-features = false, features = ["cargo_bench_support"] }
# FC-4 (a11y yaw node query) + FC-7 (injected-clock determinism) interaction
# tests, plus the LAW#4 wgpu snapshot proof for the 3D logo.
egui_kittest = { version = "0.36", features = ["wgpu", "snapshot"] }
image = { version = "0.25", default-features = false, features = ["png"] }
# The clip-sweep's RED-when-broken control tessellates the OLD `Shape::convex_polygon`
# lane directly, to prove the miter blow-up this crate's fix removes was real.
epaint = "0.36"

# HEAVY bench (L3): the generated dataset, the one-off force layout, and the
# per-frame projection / GPU scene build, swept 10k -> 100k nodes.
[[bench]]
name = "heavy_graph3d"
harness = false

# `scene_probe` measures `gpu_scene()`, which only exists under `wgpu`. Declared here so
# a DEFAULT-feature `cargo build --examples` skips it instead of failing to compile — the
# forge-default trap: a target that only builds with a feature turned on is a target that
# is broken for everyone who does not turn it on.
[[example]]
name = "scene_probe"
required-features = ["wgpu"]