Racket × first-party native UI · MIT

Racket for logic. Real native apps.

Rivet embeds the Racket CS runtime inside first-party native apps: WinUI 3 on Windows, SwiftUI on macOS — with typed RPC, events, shared state, cancellation and lifecycle over one contract.

Racket backend — declare once
backend.rkt
#lang racket/base (require rivet/backend) (define-event progress) (define-state counter : Int64 0) (define-rpc (greet [name : String] : String) (format "Hello, ~a!" name)) (define-rpc (increment [value : Int64] : Int64) (add1 value))
Generated client — call natively
App.swift — generated by raco rivet build
// typed Swift, generated at build time let text = try await backend.greet(name: "Rivet") // "Hello, Rivet!" let next = try await backend.increment(value: 41) // 42 backend.onProgress { pct in // events arrive as typed values }
Why Rivet

Racket is great at logic. Commercial apps need native UI.

There was no direct path from a Racket backend to the modern first-party desktop stacks. Rivet fills that gap.

First-party native UI

WinUI 3 on Windows, SwiftUI/AppKit on macOS — each platform stays itself.

One backend contract

Typed RPC, events, shared state, cancellation and lifecycle over the same RVT1 protocol.

Generated native clients

raco rivet build generates typed Swift and C++ APIs from your declarations.

Embedded Racket CS

The Racket runtime lives inside the application process — no external backend to manage.

Exact runtime matching

Rivet stages the installed Racket CS runtime and never silently falls back to a nearby version.

Safe threading by design

The native side only sees framed RVT1 messages and generated values.

Positioning

Four projects, four trade-offs.

The Racket desktop stack: Rivet, Glaze, Bezel, Tessera — different trade-offs, not replacements for one another.

Rivet Glaze Bezel Tessera
UI stack WinUI 3 / SwiftUI HTML/CSS/JS + WebView Qt 6 Widgets custom GPU-rendered
Native widgets first-party OS UI no Qt widgets custom drawn
One UI codebase no yes yes yes
Best fit platform-native commercial apps web-tech desktop apps traditional cross-platform GUI fully custom declarative UI