Platform Support

zero-native exposes one runtime model across desktop hosts, but native affordances land per platform and per web engine. Unsupported operations return explicit runtime errors instead of pretending that every host can do the same thing.

Desktop Hosts

AreamacOS system WebViewmacOS ChromiumLinux system WebViewLinux ChromiumWindows system WebView
Main WebViewSupportedSupportedSupportedUnsupportedSupported
Child WebViewsSupportedSupportedSupportedUnsupportedSupported
Native viewsSupportedUnsupportedSupportedUnsupportedSupported
Native control commandsSupportedUnsupportedSupportedUnsupportedSupported
App menusSupportedUnsupportedSupportedUnsupportedSupported
System traySupportedSupportedUnsupportedUnsupportedSupported
Keyboard shortcutsSupportedSupportedSupportedUnsupportedSupported
DialogsSupportedSupportedSupportedUnsupportedSupported
Clipboard textSupportedSupportedSupportedUnsupportedSupported
Clipboard rich dataSupportedSupportedSupportedUnsupportedSupported
Open URL / reveal pathSupportedSupportedSupportedUnsupportedSupported
NotificationsSupportedSupportedSupportedUnsupportedSupported
Recent documentsSupportedSupportedSupportedUnsupportedSupported
CredentialsSupportedSupportedSupportedUnsupportedSupported
File dropsSupportedUnsupportedSupportedUnsupportedSupported
App activation eventsSupportedSupportedSupportedUnsupportedSupported

Runtime Queries

Use Runtime.supports(...) when native code needs to branch on the current host:

if (runtime.supports(.native_views)) {
    try runtime.createView(.{
        .label = "sidebar",
        .kind = .sidebar,
    });
}

JavaScript can query the same support model through the built-in bridge when js_window_api or an explicit builtin_bridge policy allows zero-native.platform.supports:

const hasTray = await window.zero.platform.supports("tray");

Feature names match the Zig PlatformFeature enum and the TypeScript ZeroNativePlatformFeature union. JavaScript callers may use either snake_case names such as native_views or camelCase aliases such as nativeViews. Unsupported operations still reject explicitly if called; support checks are intended for choosing UI affordances before making those calls.

Native Surfaces

The macOS, Linux, and Windows system-WebView hosts support toolbar, titlebar_accessory, sidebar, statusbar, split, stack, button, icon_button, checkbox, toggle, segmented_control, text_field, search_field, label, spacer, and progress_indicator native view kinds.

ViewKind.webview is the compatibility path for WebView-backed views. Existing runtime.createWebView(...) and window.zero.webviews.* APIs remain available.

Chromium builds are currently enabled on macOS only. Linux and Windows Chromium host files are placeholders and build/package tooling rejects those targets until the native hosts are implemented.

Mobile And GPU

iOS and Android are supported today through embedded host examples rather than the desktop platform host matrix. The mobile examples own native header/navigation layout in UIKit or Android views, embed a WKWebView or Android WebView as the workspace, and drive zero-native through the C/JNI lifecycle, activation, resize, and command calls documented in Embedded App.

AreaiOS embedded hostAndroid embedded host
Native header/navigationUIKit header with Back and Refresh command buttonsAndroid view header with Back and Refresh command buttons
WebView content areaWKWebView workspaceAndroid WebView workspace
Runtime lifecyclezero_native_app_create, start, activate, deactivate, stop, and destroy from SwiftJNI bridge for create, start, activate, deactivate, stop, and destroy
Resize and orientationviewDidLayoutSubviews forwards WebView size and screen scaleOrientation/screen-size changes stay in the activity; surfaceChanged forwards size, density, and Surface
Keyboard avoidanceKeyboard frame notifications adjust the WebView bottom constraintwindowSoftInputMode="adjustResize" lets Android relayout the content area
Back/navigation commandNative Back button dispatches mobile.backNative Back button and system Back dispatch mobile.back
Touch forwardingUIKit/WebKit own touch handling for the WebView workspaceMotionEvent pointer data is forwarded through zero_native_app_touch
Generic ShellView mappingMobile shell metadata feeds generated UIKit host config for header labels, command buttons, and WebView workspaceMobile shell metadata feeds generated Android host config for header labels, command buttons, and WebView workspace

Mobile hosts own safe areas, orientation, keyboard avoidance, back gestures, and platform lifecycle integration. The current mobile mapping is package-time shell metadata for native header/workspace structure; dynamic generic native view bridge commands should still be treated as desktop APIs until UIKit and Android runtime view mutation is added.

gpu_surface is reserved for future custom drawing regions. Current hosts report unsupported operations for that view kind and runtime.supports(.gpu_surfaces) / window.zero.platform.supports("gpuSurfaces") return false.