rae 0.1.6

Renderer-neutral widget, layout, sanitization, and GLSL shader primitives for Rust desktop tools.
Documentation

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/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       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

[dependencies]
rae = { path = "../KnottRustDesign", version = "0.1.6" }

Verify

cargo fmt --all --check
cargo check
cargo test
cargo package --allow-dirty

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, and MorphState describe whole-card transitions between rounded cards, capsules, blobs, tickets, notched panels, dock islands, and command lenses.
  • MaterialTokens packages 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 rae to terminal-frame rendering.
  • The shader catalog exposes each effect through the same ShaderDescriptor family/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_full combines multiple modules into one shell snapshot without binding rae to a renderer or 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:

  • sanitize strips ANSI/OSC escape sequences, replaces unsafe controls, removes zero-width directional formatting, tracks truncation, and computes display width.
  • output materializes 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_output shows 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.