You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GPU-native 2D scene graph renderer for desktop UIs, widgets, and interactive content.
Written in Rust · Powered by wgpu (Vulkan / DX12) · V8 JavaScript engine
Disclaimer:
AI is technically being used on this project, but it will mostly be used for git comments, conceptualizing, quick edits and locating bugs that arent shown when running Cargo build.
The final product/major update will be fully written by me using no AI tools what so ever
Installation
Download prism-installer.exe and run it to install PRISM to C:\Program Files\PRISM\:
✓ Create installation directories with proper structure:
bin/ — PRISM executables (added to PATH)
lib/ — Runtime libraries and assets
✓ Copy prism.exe to the bin directory
✓ Add C:\Program Files\PRISM\bin to your system PATH
✓ Create an uninstaller
After installation, open a new terminal and you can use prism from anywhere:
prism -c widget.html # Compile
prism -r widget.prd # Run
prism --help # Show help
CLI Tool: prism.exe
Once installed, use the command-line tool to compile and render widgets:
# Compile HTML/CSS to binary .prd format
prism -c my-widget.html
# Run a widget in a GPU window
prism -r my-widget.prd
# Auto-detect widget in current directory
prism -c # Finds the only .html
prism -r # Finds the only .prd or .html# Show help
prism --help
Overview
Prism compiles a practical subset of HTML, CSS, and JavaScript into a binary intermediate format (PRD), then renders it directly on the GPU via instanced SDF quads. No browser engine, no WebView — a single Rust library that turns markup into pixels.
PRISM is available both as an embeddable Rust library crate (prism_runtime) and as a standalone runtime binary (prism-rt) for direct usage.
Development of PRISM originally began for VEIL, a Windows desktop customization platform whose interface relied on WebView2. Existing solutions did not provide the level of rendering performance or system efficiency required, often resulting in higher-than-desired resource usage and inconsistent responsiveness.
Key Features
Feature
Description
GPU-native rendering
Every UI element is a single instanced quad. The WGSL fragment shader evaluates SDF rounded rectangles with analytic anti-aliasing — no CPU tessellation, no MSAA.
HTML/CSS compiler
Parses a subset of HTML and CSS into a fully resolved binary document (PRD). Supports flexbox, grid, variables, gradients, animations, and 50+ CSS properties.
V8 JavaScript engine
Full ECMAScript support via Google's V8 JIT compiler. DOM querying, class manipulation, Canvas 2D API, timers, and IPC bridge.
Canvas 2D API
<canvas> element with near-complete 2D context — paths, fills, strokes, transforms, gradients, image data, compositing. Software-rendered via tiny-skia, composited on GPU.
Layout engine
Block flow, Flexbox, CSS Grid, absolute/fixed positioning — all resolved per-frame when dirty.
Animation runtime
CSS @keyframes and transition with duration, delay, iteration, direction, fill mode, easing (linear, ease, cubic-bezier). 20+ animatable properties.
Live data binding
<data-bind>, <data-bar>, and <data-bar-stack> elements display real-time values from IPC (CPU, GPU, RAM, storage, network, etc.).
Text rendering
GPU text via glyphon (cosmic-text). Font families, weight, size, line-height, letter-spacing, text-transform, text-align.
SVG support
<svg> elements with <path>, <circle>, <rect>, <line>, <ellipse>, <polygon>, <polyline> — auto-rasterized via resvg.
Image support
PNG, JPEG, WebP, ICO — embedded in the asset bundle. Object-fit modes: fill, contain, cover, none.
IPC bridge
Named-pipe client for live data streaming. Optional VEIL bridge for 16+ system data sections. JavaScript IPC API for custom commands.
Platform integration
Windows desktop embedding (WorkerW) for wallpapers, monitor enumeration with DPI awareness.
Editable properties
Runtime CSS variable overrides driven by manifest.json schema + editable.yaml user values.
Compile-once caching
PRD documents cached to disk with SHA-256 hash invalidation. Zero parsing at render time.
Architecture
Render Pipeline
Each frame follows the same path:
Layout — Resolve dimensions and positions for the entire PRD tree (only when dirty)
Animate — Advance active animations and apply interpolated property values
All rendering is instanced — one quad per UI element. The WGSL fragment shader evaluates:
SDF rounded rectangles with per-corner radius
Per-side border widths and colors (solid)
Background colors, gradient textures, and image sampling
Clip rectangle masking (overflow: hidden/scroll)
Per-instance opacity
Analytic anti-aliasing (no MSAA)
Global uniforms provide viewport size, elapsed time, and DPI scale factor.
Distribution Formats
Format
Extension
Description
PRD
.prd
Single compiled document (binary, serde + bincode)
Web Standard Compatibility
Prism implements a practical subset of web standards optimized for high-performance GPU-rendered desktop UIs. The tables below document exact coverage against HTML, CSS, and JavaScript specifications.
Legend: ✅ Fully supported | ⚠️ Partial / parsed but limited | ❌ Not supported
HTML Element Support
Containers & Semantic Structure
Element
Status
Notes
<div>
✅
Block container (flex/grid via CSS)
<section>
✅
Semantic block container
<nav>
✅
Navigation container
<header>
✅
Header container
<footer>
✅
Footer container
<main>
✅
Main content container
<aside>
✅
Sidebar container
<article>
✅
Article container
<figure>
✅
Figure container
<figcaption>
✅
Figure caption
Text & Inline Content
Element
Status
Notes
<span>
✅
Inline container
<p>
✅
Paragraph — flex row with wrap for inline content
<h1> – <h6>
✅
Headings with default sizes (32px – 10.72px), bold
<label>
✅
Inline label
<strong>, <b>
✅
Bold text (font-weight: 700)
<em>, <i>
✅
Italic text
<small>
✅
Small text
<code>
✅
Inline code
<a>
⚠️
Rendered as inline container; navigation via data-action="navigate"
<br>
❌
Not supported — use CSS margin/padding
<hr>
❌
Not supported — use a styled <div>
<pre>, <blockquote>, <abbr>, <cite>, <q>
❌
Not supported
<mark>, <del>, <ins>, <sub>, <sup>, <u>
❌
Not supported
Lists
Element
Status
Notes
<ul>
✅
Unordered list (rendered as block container)
<ol>
✅
Ordered list (rendered as block container, no auto-numbering)
<li>
✅
List item (rendered as block)
Media
| Element | Status | Notes |
| :-------- | : ------: | :------ |
| <img> | ✅ | PNG, JPEG, WebP, ICO from asset bundle. Object-fit: fill, contain, cover, none |
| <svg> | ✅ | Auto-rasterized to texture via resvg |
| <path>, <circle>, <rect>, <line>, <ellipse>, <polygon>, <polyline> | ✅ | SVG primitives (rasterized, not individually styleable via CSS) |
| <canvas> | ✅ | Full Canvas 2D API via tiny-skia backend |
| <video> | ❌ | Not supported |
| <audio> | ❌ | Not supported |
| <picture>, <source> | ❌ | Not supported |
Forms & Input
Element
Status
Notes
<button>
✅
Primary, Secondary, Danger, Ghost, Link variants via data-variant
<input type="text">
✅
Text input with placeholder, maxlength, readonly
<input type="password">
✅
Masked input
<input type="number">
✅
Numeric input
<input type="email">
✅
Email input
<input type="search">
✅
Search input
<input type="checkbox">
✅
Checkbox and toggle styles via data-style
<input type="range">
✅
Slider with min, max, step
<textarea>
✅
Multi-line text area with rows, maxlength
<select>
✅
Dropdown selector
<option>
✅
Dropdown option items
<form>
❌
No form submission model
<fieldset>, <legend>
❌
Not supported
<datalist>, <output>, <progress>, <meter>
❌
Not supported
Prism Custom Elements
Element
Status
Notes
<data-bind>
✅
Live data display — binding="cpu.usage" with format string
<data-bar>
✅
Progress bar bound to IPC data (binding + max-binding + color)
<data-bar-stack>
✅
Multi-segment stacked bar with per-segment bindings
Path to CSS file (optional, defaults to companion .css)
--monitor
Monitor index (default: primary)
--fps
Target frame rate
IPC Data Binding
Prism nodes can bind to live data via the IPC bridge. Data keys use dot-notation paths.
<data-bindbinding="cpu.usage" format="{value}%"></data-bind><data-barbinding="ram.used_bytes" max-binding="ram.total_bytes" style="background: #4a9eff"></data-bar><data-bar-stackmax-binding="storage.total_bytes"><data-bar-segmentbinding="storage.disks.0.used_bytes" style="background: var(--disk0)"></data-bar-segment><data-bar-segmentbinding="storage.disks.1.used_bytes" style="background: var(--disk1)"></data-bar-segment></data-bar-stack>
JavaScript can also send IPC commands directly:
__or_sendIpc("sysdata","get_cpu",null);
When connected to VEIL, the bridge polls 16+ data sections (time, CPU, GPU, RAM, storage, displays, network, Wi-Fi, Bluetooth, audio, keyboard, mouse, power, idle, system, processes) and flattens them into a key-value map consumed by the scene graph.
Dependencies
Category
Crate
Version
GPU
wgpu
28.0
Windowing
winit
0.30
Text rendering
glyphon
0.10
GPU buffers
bytemuck
1.25
Images
image
0.25
JavaScript
v8
146.3
Canvas 2D
tiny-skia
0.12
SVG
resvg
0.47
Serialization
serde, serde_json, bincode
1.0 / 1.0 / 2.0
CSS parsing
cssparser
0.36
Platform
windows
0.62
File watching
notify
8.2
Archives
zip
8.1
Hashing
sha2, hex
0.10 / 0.4
Concurrency
parking_lot
0.12
Requirements
OS: Windows 10 or 11
GPU: Vulkan or DirectX 12 capable
Project Status
Under active development (v0.1.0). APIs, document format, and behavior may change.