rae
rae is a renderer-neutral Rust design crate for shader-heavy desktop coding tools.
It was extracted from xrae so multiple codebases can improve the same widget, layout, math, agent-flow, and GLSL shader primitives without coupling themselves to one app shell.
What It Owns
src/color.rs Palette and RGBA primitives
src/effect.rs Ripple, glow, elevation, focus, and motion primitives
src/layout.rs Prompt/transcript/sidebar/status layout
src/math.rs CPU-side animation and shader math helpers
src/morph.rs Whole-card topology/morph descriptors and material tokens
src/output.rs Sanitized Markdown/code output rows and code token classes
src/sanitize.rs ANSI/control-safe text helpers and display-width utilities
src/shader.rs Heavy GLSL shader catalog with families/descriptors
src/state.rs Agent mode, thinking, pane, overlay, resource state
src/transcript.rs Transcript viewport measurement and scroll materialization
src/deck.rs Command palette, context, provider, theme, status deck models
src/flow.rs Agent phases, Kanban, edit plans, run records, validation profiles
src/sidecar.rs Safe sidecar command previews and workspace write target guards
src/theme.rs Built-in visual themes
src/widget.rs Shared widget frame and prompt/transcript models
Use From A Sibling App
[]
= { = "../KnottRustDesign", = "0.1.5" }
Verify
Publishing Note
The package name is rae; publish only after the verification gates pass for the intended version.
0.1.1 Focus
rae is leaning hard into high-end interaction design:
- Flutter/Material-style ripple pools and click effects.
- Glow, elevation, disabled, focus-ring, hover, selected, and pressed state resolution.
- Motion specs and curves for fast/standard/slow interaction timing.
- Shader descriptors grouped by background, panel, prompt, interaction, code, data, and agent-flow families.
- GLSL effects for curl nebula, aurora curtains, raymarched knot fields, terminal rain, ripples, bloom glows, code lenses, reaction-diffusion cells, Voronoi crystal panels, and plasma graph networks.
0.1.2 Direction
rae now treats cards and panels as morphable topology surfaces instead of static rectangles:
MorphShape,CardTopology,MorphProfile, andMorphStatedescribe whole-card transitions between rounded cards, capsules, blobs, tickets, notched panels, dock islands, and command lenses.MaterialTokenspackages fill/stroke/glow/shadow/blur/elevation values for glass and elevated surfaces.- SDF GLSL can morph an entire card silhouette with animated edge waves, blob pressure, notches, capsule pulls, and rim glow.
- Extra shaders cover metaball cards, Google-style aura fields, orbital meshes, glass caustics, and liquid chrome surfaces.
0.1.3 Direction
rae now ports high-signal ideas from Aisling/KnottEffects into renderer-neutral GLSL motifs:
- Blackhole gravity wells, elliptical rings, fireworks, laser etching, scan beams, synth grids, spotlights, swarms, storms, VHS glitches, waves, vortices, cascades, and grid pulses.
- Aisling-style deterministic hash noise and staggered progress/reveal timing are embedded directly in shader code, without coupling
raeto terminal-frame rendering. - The shader catalog exposes each effect through the same
ShaderDescriptorfamily/complexity metadata used by existing consumers.
0.1.4 Examples
rae now ships a growing examples/ suite, modeled after the broad demo coverage in ../KnottTUI/examples:
- Shader catalog and Aisling shader gallery examples show how to discover GLSL sources and choose effects for app surfaces.
- Effects, morph, layout, widget, transcript, flow, sidecar, and theme examples print renderer-neutral snapshots that real renderers can consume.
demo_fullcombines multiple modules into one xrae-style shell snapshot without bindingraeto a renderer or sidecar runtime.
Try one with cargo run --example demo_shader_catalog or compile them all with cargo test --examples.
0.1.5 Code Output Safety
rae now includes out-of-the-box sanitized assistant/code output primitives:
sanitizestrips ANSI/OSC escape sequences, replaces unsafe controls, removes zero-width directional formatting, tracks truncation, and computes display width.outputmaterializes Markdown-like assistant text into renderer-neutral rows for headings, paragraphs, bullets, quotes, fenced code, line-number gutters, code tokens, and copy-safe Markdown.demo_code_outputshows a complete safe rendering pipeline for model output containing Markdown, code fences, comments, strings, numbers, and terminal escape injection attempts.