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:
- GTK3 and WebKitGTK 4.1 —
gtk3 webkit2gtk4.1on Fedora,libgtk-3-0 libwebkit2gtk-4.1-0on Debian and Ubuntu. These are the runtime libraries and they aredlopened, so no-develpackage is needed for either. - The C development package —
glibc-develon Fedora and openSUSE,libc6-devon Debian and Ubuntu.cc()compiles the shim against libc, and linking wants thelibc.solinker script, which only that package ships; the runtime package carrieslibc.so.6and no script. Installing GTK and WebKitGTK alone leaves the very first command failing.
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 proves | how |
|---|---|
| the two libraries load with the symbols the shim resolves | dlopen per entry, gtk_init_check after it |
| a window exists and is shown | GtkWindow + WebKitWebView, then webkit_web_view_load_uri |
| the pump runs | 7 g_main_context_iteration slices in 120 ms at a 16 ms interval |
| liveness is readable from C | shim_window_alive still answers 1 after the pump |
quit() ends the process | exit 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:
| module | example symbol | without it |
|---|---|---|
user32.dll | CreateWindowExW | no window at all |
user32.dll | PeekMessageW | the pump drains nothing |
kernel32.dll | MultiByteToWideChar | no string reaches Win32, so no title and no URL |
ole32.dll | CoInitializeEx | WebView2 cannot create its controller |
WebView2Loader.dll | CreateCoreWebView2EnvironmentWithOptions | no 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:
- macOS, measured.
bun run e2e:windowopens a real window at900x640, grows it to1200x760and shrinks it to640x460, and asserts theinnerWidth/innerHeightthe page reports after each — 64 assertions, green 2026-11-18. Against the pre-fix runtime both resize assertions failed withpage saw 900x640, and the frames readwindow 1400x840, content 1100x760— the defect as numbers. - Windows arm64, no verdict yet. The
windows-arm-runtimeworkflow patches a scaffold so the page reports its viewport and the backend resizes the real HWND900x640 → 1400x900 → 700x480, checking each report against the client rect it measured, ±2 px after dpr. It drivesSetWindowPosdirectly because at v0.1.30 the runtime binds thewindowcommands to the AppKit adapter, sowindow.setSizeanswersnot-implementedthere. The window and greet lines are measured; the resize assertions landed after v0.1.30 and the job runs onv*tags or dispatch, so this half is read from code until a tag reports it. - Linux, read from code. The page is the main child of the window's
GtkOverlaycontainer, so it follows the allocation and a resize reaches it the same way; no probe has asked a GTK page for its viewport, so nothing here is measured.
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.platform | barrel |
|---|---|
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.