Platforms

All three are proven on real hardware: macOS and Linux by their own probes, Windows by a windows-latest runner executing CoInitializeEx, RegisterClassExW and a real WebView2 controller. This page says what each proof covers, because "it compiles" and "it ran" are different claims and only the second one ships.

The contract

A platform implements Platform and nothing more: start, pump, createWindow, window, quit. Five methods, one page loader.

A page loads from the bridge URL (http://127.0.0.1:<port>/), navigated by the platform's own call. No platform registers a custom scheme to serve a page, and urlScheme is optional app config with no default — so crust:// belongs to an app's deep links, never to the framework. The reasoning is on the design page.

macOS — proven

src/platform/darwin/ is the runtime the rest of the docs describe. Every AppKit call goes through bun:ffi into the Objective-C runtime, with the shim compiled at launch by the TinyCC inside Bun. The traps that shaped it — variadic objc_msgSend, structs that cannot cross, an unverified selector killing the process — are on the design page.

What proves it: bun run e2e:parity builds a real app, launches it, and asserts what it printed — twenty surfaces, twenty-seven assertions, quoted on the parity page.

Linux — proven

src/platform/linux/ is GTK3 plus WebKitGTK over bun:ffi, with no native artifact: the C shim is compiled at launch and reaches both libraries through dlopen.

Three packages, and only one of them is a compiler dependency — the asymmetry is what costs people a first run:

Without it TinyCC answers library c not found, which names no package at all — crust translates that message into the install line below rather than letting it through raw.

sudo dnf install gtk3 webkit2gtk4.1 glibc-devel        # Fedora
sudo zypper install gtk3 webkit2gtk4.1 glibc-devel      # openSUSE
sudo apt install libgtk-3-0 libwebkit2gtk-4.1-0 libc6-dev   # Debian, Ubuntu

bun run e2e:linux is the proof. It syncs the layer to an OrbStack machine (ubuntu-sandbox, Ubuntu 25.10 aarch64), installs only what is missing there, runs the unit suite, then the real-GTK smoke under xvfb-run:

PASS  machine         ubuntu-sandbox: Ubuntu 25.10 aarch64
PASS  gtk + webkit    libgtk-3.so.0 and libwebkit2gtk-4.1.so.0 load, with the symbols the shim resolves
PASS  gtk init        gtk_init_check returned 1 (DISPLAY=:99)
PASS  window          smoke: GtkWindow + WebKitWebView, shown, loading about:blank
PASS  pump            7 g_main_context_iteration slices in 120 ms at a 16 ms interval
PASS  still open      shim_window_alive still answers 1 after the pump
PASS  quit            quit() ended the process with 0 from inside the platform
e2e:linux: PASS  8/8 assertions  7.9s

The unit suite in the same VM: 30 pass, 1 skip, 0 fail on Linux arm64.

CI runs the same smoke on ubuntu-latest — the gate (ubuntu) job runs bun test src/platform/linux and then xvfb-run --auto-servernum … bun run scripts/linux-smoke.ts, so a regression in the shim's dlopen path fails the build rather than waiting for the next manual run.

what the smoke proveshow
the two libraries load with the symbols the shim resolvesdlopen per entry, gtk_init_check after it
a window exists and is shownGtkWindow + WebKitWebView, then webkit_web_view_load_uri
the pump runs7 g_main_context_iteration slices in 120 ms at a 16 ms interval
liveness is readable from Cshim_window_alive still answers 1 after the pump
quit() ends the processexit 0 from inside the platform

What it does not prove. The smoke renders a real document and drives page JavaScript, an invoke round trip and the event stream, but it does not exercise window-close pruning, a second window, or Linux packaging. Those are the next findings, not a claim this page can make.

Windows — proven

src/platform/windows/ is Win32 plus WebView2, one window and one controller per label, pumped from Bun's main thread because Win32 will not dispatch without a message loop.

The preflight names every entry point the shim calls and what breaks without it, because an unresolvable export is a crash with no JavaScript error to catch:

moduleexample symbolwithout it
user32.dllCreateWindowExWno window at all
user32.dllPeekMessageWthe pump drains nothing
kernel32.dllMultiByteToWideCharno string reaches Win32, so no title and no URL
ole32.dllCoInitializeExWebView2 cannot create its controller
WebView2Loader.dllCreateCoreWebView2EnvironmentWithOptionsno WebView2 environment

WebView2 is a separate install on Windows 10, so the preflight carries Microsoft's Evergreen Bootstrapper URL as the remedy when the runtime is absent.

bun run scripts/windows-smoke.ts on windows-latest is the proof, and it runs in the gate (windows) job on every push:

PASS  runtime         WebView2 156.0.4314.58 on Windows 10.0.26100
PASS  loader          WebView2Loader.dll is beside the executable or on PATH
PASS  preflight       the runtime and loader the shim needs are both present
PASS  com + class     CoInitializeEx and RegisterClassExW("crust-smoke") succeeded
PASS  window          smoke: HWND 328220 with a WebView2 controller, navigated to about:blank
PASS  pump            shim_pump dispatched 1 of 1 posted WM_NULL over 3 slices
PASS  still open      shim_window_is_open still answers 1 after the pump
windows:smoke: PASS  7/7 assertions  26.8s

A third mode runs the composite — exactly what window-open.ts does on the product path, with no per-step probes and no explicit NavigateToString — so a green there is the shipping path's own rather than a probe warming the WebView up first.

What it does not prove. This smoke loads about:blank, so the x64 windows-latest job has never carried a document, page JavaScript or an invoke round trip. Those cross in the windows-arm-runtime job instead, which scaffolds with crust init, builds, and runs the built binary on windows-11-arm: its v0.1.28, v0.1.29 and v0.1.30 runs each printed window open and greet hello crust (page call answered), so one real page has invoked across the bridge on arm64. minWidth/minHeight now constrain the window on Windows — WM_GETMINMAXINFO answers the configured floor, and a create size below it is clamped up. There is still no DPI-awareness declaration, so a scaled display may size the page differently than macOS does. The Linux result above does not carry over: different libraries, different message loop, different loader.

The page follows its window

A window that reports the size it set while the webview stays where it opened is what "apps can't be resized" looked like, so the claim that needs proving is the page's own viewport, not the command's answer. Three different strengths of proof:

All three are selected

loadPlatform dispatches on the OS and imports one barrel per arm, so a Linux launch never loads AppKit and a macOS launch never loads GTK:

process.platformbarrel
darwin@/platform/darwin
linux@/platform/linux
win32@/platform/windows

Anything else is refused by name: crust: no platform for <os> — macOS, Linux and Windows for now.