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

nordisk/facett

.nornir/assets/facet_render_circuit.svg

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1180 700" font-family="'DejaVu Sans', 'Segoe UI', sans-serif">
  <defs>
    <linearGradient id="board" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#0b1c2e"/>
      <stop offset="1" stop-color="#06111d"/>
    </linearGradient>
    <linearGradient id="chip" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#14384f"/>
      <stop offset="1" stop-color="#0e2a3e"/>
    </linearGradient>
    <linearGradient id="rail" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#173d57"/>
      <stop offset="1" stop-color="#0c2438"/>
    </linearGradient>
    <linearGradient id="kernel" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#123a4f"/>
      <stop offset="1" stop-color="#0a2433"/>
    </linearGradient>
    <linearGradient id="state" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#0f3a3f"/>
      <stop offset="1" stop-color="#0a262a"/>
    </linearGradient>
  </defs>

  <rect x="0" y="0" width="1180" height="700" fill="url(#board)"/>
  <g stroke="#143a52" stroke-width="1">
    <line x1="0" y1="76" x2="1180" y2="76"/>
    <line x1="0" y1="664" x2="1180" y2="664"/>
  </g>
  <g fill="#16415c">
    <circle cx="40" cy="40" r="2"/><circle cx="1140" cy="40" r="2"/>
    <circle cx="40" cy="684" r="2"/><circle cx="1140" cy="684" r="2"/>
  </g>

  <!-- title -->
  <text x="40" y="44" fill="#eaf6ff" font-size="22" font-weight="700">Facet render</text>
  <text x="232" y="44" fill="#9fc9e0" font-size="15">data &#8594; <tspan fill="#bfe6ff" font-weight="700">Scene</tspan> &#8594; the shared <tspan fill="#bfe6ff" font-weight="700">draw</tspan> kernel &#8594; pixels, and a parallel <tspan fill="#bfe6ff" font-weight="700">state_json</tspan> spur for headless tests</text>

  <!-- legend -->
  <g font-size="12.5">
    <line x1="690" y1="38" x2="730" y2="38" stroke="#6fd3f5" stroke-width="3"/>
    <text x="738" y="42" fill="#cfe6f5">draw path (pixels)</text>
    <line x1="900" y1="38" x2="940" y2="38" stroke="#7fe9cf" stroke-width="3" stroke-dasharray="6 4"/>
    <text x="948" y="42" fill="#cfe6f5">state_json (headless)</text>
  </g>

  <!-- ===================== INPUT PINS (left): source-agnostic data ===================== -->
  <g font-family="'DejaVu Sans Mono', monospace" font-size="12.5">
    <text x="36" y="142" fill="#eaf6ff">Arrow RecordBatch</text>
    <text x="36" y="206" fill="#eaf6ff">labeled edges / graph</text>
    <text x="36" y="270" fill="#eaf6ff">(lon, lat) / WKB</text>
    <text x="36" y="334" fill="#eaf6ff">(name, Status) + DAG</text>
  </g>
  <text x="36" y="360" fill="#86b3cc" font-size="11" font-family="'DejaVu Sans', sans-serif">source-agnostic: hand it data, it draws</text>

  <g fill="#6fd3f5" stroke="#0a1622" stroke-width="1">
    <circle cx="232" cy="138" r="6"/>
    <circle cx="232" cy="202" r="6"/>
    <circle cx="232" cy="266" r="6"/>
    <circle cx="232" cy="330" r="6"/>
  </g>
  <g stroke="#6fd3f5" stroke-width="3" fill="none">
    <path d="M232 138 H300"/>
    <path d="M232 202 H300"/>
    <path d="M232 266 H300"/>
    <path d="M232 330 H300"/>
  </g>

  <!-- ===================== FACET CHIPS ===================== -->
  <rect x="300" y="108" width="190" height="252" rx="10" fill="url(#chip)" stroke="#5aa6cf" stroke-width="2"/>
  <text x="395" y="132" fill="#eaf6ff" font-size="15" font-weight="700" text-anchor="middle">impl Facet</text>
  <text x="395" y="150" fill="#86b3cc" font-size="10.5" text-anchor="middle">title / ui / state_json</text>

  <g font-family="'DejaVu Sans Mono', monospace" font-size="11.5" fill="#bfe6ff" text-anchor="middle">
    <text x="395" y="180">GridView · Table</text>
    <text x="395" y="200">GraphView · DepGraph</text>
    <text x="395" y="220">Graph3D · PipelineView</text>
    <text x="395" y="240">GeoMap · MapView · Plot</text>
    <text x="395" y="260">IcebergView · SystemChart</text>
    <text x="395" y="280">ProgressView · FormView</text>
  </g>
  <text x="395" y="312" fill="#9fc9e0" font-size="11" text-anchor="middle">each builds a Scene / owns its painter</text>
  <text x="395" y="332" fill="#86b3cc" font-size="10.5" text-anchor="middle">scene_from_batch · scene_from_labeled_edges</text>
  <g fill="#6fd3f5">
    <rect x="294" y="134" width="6" height="8"/>
    <rect x="294" y="198" width="6" height="8"/>
    <rect x="294" y="262" width="6" height="8"/>
    <rect x="294" y="326" width="6" height="8"/>
  </g>

  <!-- ===================== FacetDeck composer ===================== -->
  <rect x="300" y="400" width="190" height="78" rx="10" fill="url(#rail)" stroke="#3a7fa3"/>
  <text x="395" y="426" fill="#eaf6ff" font-size="14" font-weight="700" text-anchor="middle">FacetDeck</text>
  <text x="395" y="446" fill="#9fc9e0" font-size="10.5" text-anchor="middle">Vec&lt;Box&lt;dyn Facet&gt;&gt;</text>
  <text x="395" y="463" fill="#86b3cc" font-size="10" text-anchor="middle">tab bar · zoom/clipboard routing</text>
  <!-- facets feed the deck -->
  <path d="M395 360 V400" stroke="#6fd3f5" stroke-width="2.5" fill="none" stroke-dasharray="3 3"/>

  <!-- ===================== RENDER KERNEL (center) ===================== -->
  <rect x="560" y="120" width="300" height="230" rx="12" fill="url(#kernel)" stroke="#7fc8ea" stroke-width="2.5"/>
  <text x="710" y="146" fill="#7fc8ea" font-size="15" font-weight="700" text-anchor="middle">facett-core kernel</text>
  <text x="710" y="164" fill="#5fa8c4" font-size="10.5" text-anchor="middle">one crate everyone shares</text>

  <rect x="586" y="186" width="248" height="50" rx="8" fill="url(#chip)" stroke="#2b6f96"/>
  <text x="710" y="208" fill="#eaf6ff" font-size="13" font-weight="700" text-anchor="middle">Scene · Node · Edge · Layout</text>
  <text x="710" y="225" fill="#9fc9e0" font-size="10.5" text-anchor="middle">Circular / Force · hash_color · Theme</text>

  <rect x="586" y="250" width="248" height="50" rx="8" fill="url(#chip)" stroke="#2b6f96"/>
  <text x="710" y="272" fill="#eaf6ff" font-size="13" font-weight="700" text-anchor="middle">draw() &#183; Facet::ui</text>
  <text x="710" y="289" fill="#9fc9e0" font-size="10.5" text-anchor="middle">CPU painter today</text>

  <rect x="586" y="312" width="248" height="26" rx="6" fill="#0f2c40" stroke="#4f8aab" stroke-width="1.2" stroke-dasharray="5 4"/>
  <text x="710" y="330" fill="#9ad6ef" font-size="11" text-anchor="middle">wgpu fast path (same draw() — coming)</text>

  <!-- deck/facet -> kernel -->
  <g stroke="#6fd3f5" stroke-width="3" fill="none">
    <path d="M490 234 H560"/>
    <path d="M490 439 H525 V275 H560"/>
  </g>
  <circle cx="560" cy="234" r="4" fill="#bfecff"/>
  <circle cx="560" cy="275" r="4" fill="#bfecff"/>

  <!-- ===================== OUTPUT: egui pixels ===================== -->
  <rect x="930" y="186" width="210" height="78" rx="10" fill="url(#chip)" stroke="#2b6f96"/>
  <text x="1035" y="214" fill="#eaf6ff" font-size="14" font-weight="700" text-anchor="middle">egui 0.34 viewport</text>
  <text x="1035" y="234" fill="#9fc9e0" font-size="11" text-anchor="middle">themed pixels on screen</text>
  <text x="1035" y="251" fill="#86b3cc" font-size="10" text-anchor="middle">korp · nornir · any host</text>
  <line x1="860" y1="225" x2="930" y2="225" stroke="#6fd3f5" stroke-width="3"/>
  <circle cx="930" cy="225" r="4" fill="#bfecff"/>

  <!-- ===================== state_json SPUR (hardened headless contract) ===================== -->
  <rect x="560" y="430" width="580" height="120" rx="12" fill="url(#state)" stroke="#2f8f7a" stroke-width="2"/>
  <text x="580" y="456" fill="#7fe9cf" font-size="14" font-weight="700">state_json &#8212; the non-negotiable introspection contract</text>
  <text x="580" y="476" fill="#5fae9c" font-size="11">every visible list / status / count is emitted as data &#8212; "see what the user sees" without a display</text>

  <rect x="580" y="492" width="250" height="44" rx="8" fill="url(#chip)" stroke="#2b6f96"/>
  <text x="705" y="513" fill="#eaf6ff" font-size="12.5" font-weight="700" text-anchor="middle">Facet::state_json()</text>
  <text x="705" y="529" fill="#9fc9e0" font-size="10" text-anchor="middle">rows · cols · nodes · edges · selection &#8230;</text>

  <rect x="860" y="492" width="260" height="44" rx="8" fill="url(#rail)" stroke="#3a7fa3"/>
  <text x="990" y="513" fill="#eaf6ff" font-size="12.5" font-weight="700" text-anchor="middle">FacetDeck composes all</text>
  <text x="990" y="529" fill="#9fc9e0" font-size="10" text-anchor="middle">$KORP_STATE / $NORNIR_VIZ_STATE · MEGA matrix</text>

  <!-- state spur: facets/deck/kernel -> state rail (dashed teal) -->
  <g stroke="#7fe9cf" stroke-width="3" fill="none" stroke-dasharray="6 4">
    <path d="M395 478 V492"/>
    <path d="M710 350 V430"/>
  </g>
  <line x1="830" y1="514" x2="860" y2="514" stroke="#7fe9cf" stroke-width="3" stroke-dasharray="6 4"/>

  <!-- footer -->
  <text x="40" y="640" fill="#5e86a0" font-size="11" font-family="'DejaVu Sans Mono', monospace">facett-core (Facet · FacetDeck · Scene · draw · Theme)  &#8594;  facett-{graph,grid,table,pipeline,map,geomap,plot,form,iceberg,&#8230;}  &#8594;  korp / nornir hosts</text>
</svg>