Racket framework · MIT · Cross-platform

Racket for logic. Web for UI. One native window.

Glaze is a desktop application framework for Racket: your app logic runs in Racket, your UI is HTML/CSS/JS, and everything ships inside a native desktop window backed by the OS WebView.

A verifiable first app

raco pkg install --auto glaze
raco glaze init myapp
cd myapp
racket main.rkt

Expected result: a native desktop window opens.

Why Glaze

racket/gui works, but it's hard to style.

The full power of Racket

Macros, contracts, pattern matching — your domain logic lives in a real programming language.

Any web frontend

Tailwind, Svelte, React, or plain HTML/CSS/JS — the UI is just what the browser is already good at.

JSON API bridge

The page calls Racket with plain fetch("/api/...") — no IPC ceremony.

GUI-first, fail-fast

If the native WebView runtime is missing, startup fails with actionable guidance — never a silent browser-tab fallback.

Agent-friendly verification

webview-title, webview-url and webview-capture! are built in — CI can see what the window shows.

Real-window CI e2e

All three WebView backends pass the same real-window e2e in CI.

Product design

Racket logic, a web frontend, one desktop window

Glaze provides the runtime and explicit capability boundaries.

Application logicRacket CS
User interfaceHTML / CSS / JavaScript
Desktop windowWebView2 / WKWebView / WebKitGTK
Backend transportNative GLZ1 when selected; HTTP adapter by default in 0.x
Missing WebViewDiagnostic and repair guidance, not an external browser fallback
Quick start

Three commands to a window.

terminal
# one package: library + raco glaze CLI + docs $ raco pkg install --auto glaze # scaffold a new app $ raco glaze init myapp && cd myapp # run it — a native desktop window opens $ racket main.rkt ✓ native desktop window opened

Complete first-app tutorial: typed route, schema, verify, build →

Requirements. Racket 9.0+ (CS) everywhere; WebView2 on Windows, WKWebView on macOS, WebKitGTK on Linux.

Build one verifiable result.

先完成一个可验证的结果。

Choose Glaze for a Racket backend and a shared HTML/CSS/JS interface inside native system WebViews. A real desktop window is mandatory; there is no external-browser fallback. Product data/permissions and service policy remain application-owned.

需要 Racket 后端与共享 HTML/CSS/JS 界面,并运行于系统原生 WebView 时选择 Glaze。必须使用真实桌面窗口,不提供外部浏览器回退;产品数据、权限和服务政策归应用。

Racket CS 9.0+. Windows needs WebView2 Runtime, macOS needs an interactive WKWebView session, and Linux needs GTK 3/WebKitGTK plus a graphical session. Native GLZ1 exists on all desktops; the 0.x run-app default remains the HTTP adapter in a native WebView.

需要 Racket CS 9.0+。Windows 需要 WebView2 Runtime,macOS 需要交互式 WKWebView 会话,Linux 需要 GTK 3/WebKitGTK 和图形会话。桌面各端已有原生 GLZ1;0.x 的 run-app 默认仍是在原生 WebView 中使用 HTTP 适配器。

Follow the typed-route tutorial, review schema changes and verify an observable action in your own packaged window. The generated title/URL/screenshot probe is a starting point, not proof of your product flow. Check focus, IME, scale, accessibility, dialogs and cancellation on every supported WebView.

按类型化路由教程操作,审阅 schema 变更,并在自己的打包窗口验证可观察操作。生成的标题、URL 和截图探测仅是起点,不能证明产品流程。每个支持的 WebView 都需检查焦点、输入法、缩放、无障碍、对话框和取消。