rae
rae is a renderer-neutral Rust design crate for shader-heavy desktop tools.
It was extracted so multiple codebases can improve the same widget, layout, math, sanitized output, 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/hit.rs Hit regions, local coordinates, cursors, and resize handles
src/input.rs Command palette, shortcuts, and text snippets
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/scroll.rs Scroll state, anchoring, range clamping, and visibility helpers
src/shader.rs Heavy GLSL shader catalog with families/descriptors
src/state.rs Minimal pane and overlay identifiers
src/transcript.rs Transcript viewport measurement and scroll materialization
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.9" }
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 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:
- Shader catalog and Aisling shader gallery examples show how to discover GLSL sources and choose effects for app surfaces.
- Effects, morph, layout, widget, transcript, sanitized output, and theme examples print renderer-neutral snapshots that real renderers can consume.
demo_fullcombines multiple modules into one shell snapshot without bindingraeto a renderer or runtime.
Try one with cargo run --example demo_shader_catalog or compile them all with cargo test --examples.
For an actual rendered window, run cargo run --example demo_render_full. It uses macroquad as a dev-dependency only; the library itself remains renderer-neutral.
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.
0.1.6 Public Surface Trim
rae is intentionally focused on reusable rendering primitives. Application-specific orchestration belongs in consuming apps, not in this public crate.
0.1.7 Package Scrub
The crates.io package excludes local implementation memory and only ships reusable widget, layout, sanitization, output, shader, effect, morph, transcript, theme, color, and math modules.
0.1.8 Interaction Primitives
rae now adds generic desktop interaction helpers while keeping application behavior out of the crate:
ScrollStateandScrollAnchorhandle viewport item ranges, bottom anchoring, clamping, and minimalensure_visiblemovement.HitMap,HitRegion,CursorKind, andResizeHandleprovide renderer-neutral hit testing and resize edge detection.CommandPalette,CommandItem,Shortcut,SnippetSet, andTextSnippetmodel palette filtering and snippet expansion without runtime execution.- The default dark palette/theme was renamed to
midnightso public names are not tied to one desktop app.
0.1.9 Rendered Example
rae now includes demo_render_full, a real graphical example that opens a window and draws the design primitives as pixels:
- Renders
compute_shell_layoutrectangles as desktop panels. - Uses
raeGLSL shader sources through a dev-onlymacroquadmaterial loader. - Shows transcript materialization, command palette filtering, snippet matches, hit-test feedback, and ripple samples.
- Keeps all renderer code in
examples/, not in the reusable library modules.