Expand description
Native desktop SDK for WebUI applications.
Bundle loading, rendering, and frame configuration are available without
native dependencies. Enable application-ipc for application IPC,
native for the platform webview, source for
development compilation, and cli for the webui-desktop tooling binary.
Enable packaging to lay out an already-compiled host without source compilation.
Enable verified-update for host-only, staged-file byte integrity checks.
Enable startup-failure for an explicit host-only pre-frame error alert.
Structs§
- ApiContext
- Context passed to Rust custom-protocol API handlers.
- ApiRoute
Registry - Registry of Rust custom-protocol API handlers.
- Bundle
Asset - One asset included in a desktop bundle.
- Bundle
Integrity - Integrity metadata for immutable bundle contents.
- Desktop
App - Entry point for constructing Rust-first desktop apps.
- Desktop
AppBuilder - Builder for Rust-first WebUI desktop hosts.
- Desktop
Bundle Config - Bundle-backed desktop runtime configuration.
- Desktop
Bundle Manifest - Manifest generated by
webui desktop buildand consumed by packaging. - Desktop
Frame - Cross-platform desktop frame owned by a native shell backend.
- Desktop
Frame Capabilities - Cross-platform shell capabilities supported by the active backend.
- Desktop
Menu - Native menu descriptor.
- Desktop
Menu Item - Native menu item descriptor.
- Desktop
Protocol Request - Runtime-neutral representation of a custom-protocol request.
- Desktop
Protocol Response - Runtime-neutral representation of a custom-protocol response.
- Desktop
Response Body - Owned response bytes and any resource reservation backing their lifetime.
- Desktop
Response File - A file response bounded to the length observed when it was opened. Growth is ignored; premature EOF is an explicit I/O error.
- Desktop
Response Lease - Opaque response-lifetime reservation released when the native body is freed.
- Desktop
Runtime - Runtime state shared by a desktop webview custom-protocol handler.
- Desktop
Shell Config - Runtime-neutral shell extension points for native desktop hosts.
- Display
Bounds - Available display work area used to reject stale off-screen state.
- Event
Registry - Thread-safe registration and dispatch container for lifecycle callbacks.
- Event
Subscription - Removes a subscribed lifecycle callback when dropped.
- Rgba
- An RGBA color used for the native and document window background.
- Route
Context - Context passed to Rust route state providers.
- Route
State Registry - Registry of Rust route state providers.
- Tray
Config - Tray icon configuration.
- Window
Handle - Sendable handle that queues commands and wakes the native UI loop.
- Window
Id - Stable identity for a desktop window.
- Window
Insets - Safe-area insets reserved for native window controls.
- Window
Options - Cross-platform desktop window configuration stored in a bundle manifest.
- Window
State - Persisted window geometry supplied to and consumed by native backends.
- Window
State Store - Bounded JSON state store in the app-data directory.
Enums§
- Caption
Button Size - Size of native Windows caption buttons in an application-drawn titlebar.
- Desktop
Error - Errors produced by the runtime-neutral WebUI desktop layer.
- Desktop
Event - A native lifecycle event delivered on the backend UI thread.
- Desktop
Host Message - Strictly bounded host message sent from injected web content.
- Desktop
Host Message Error - Host-message parsing error.
- Desktop
Http Method - HTTP method for a desktop custom-protocol request.
- Desktop
Package Target - Native package target supported by
webui desktop package. - Desktop
Platform - Native platform used to calculate titlebar safe areas.
- Desktop
Response Content - Owned protocol content. Files retain an open handle and a fixed delivery length; native adapters must not reopen their paths or eagerly buffer them.
- Event
Javascript Error - Event JavaScript serialization error.
- Event
Registration Error - Lifecycle callback registration error.
- Event
Response - Response returned by a lifecycle handler.
- Rgba
Parse Error - Error returned when a manifest color is malformed.
- Titlebar
Style - Native titlebar presentation requested by a window.
- Website
Data Error - Failure to establish an app-owned persistent browser-data boundary.
- Window
Command - A command queued for execution on the native UI thread.
- Window
Command Error - Command queue error.
- Window
CssNonce Error - Error when a host-supplied CSP nonce cannot be placed in a style attribute.
- Window
Effect - Platform visual effect requested by a window.
- Window
State Error - Persistence error.
Constants§
- DEFAULT_
MAX_ ASSET_ BYTES - Default maximum file length delivered by a custom-protocol response.
- DEFAULT_
MAX_ REQUEST_ BYTES - Maximum ordinary native API request body size. Typed IPC has its own limits.
- DRAG_
REGION_ SCRIPT - Shared script for
[webui-drag]and[webui-no-drag]regions. Backends exposewindow.webuiHostPostMessage. Script injected by every backend to translatewebui-dragregions into host messages. - MAX_
EVENT_ HANDLERS - Maximum number of persistent and subscribed lifecycle callbacks.
- MAX_
HOST_ MESSAGE_ BYTES - Maximum untrusted script-message payload size.
- MAX_
QUEUED_ WINDOW_ COMMANDS - Maximum number of commands buffered for the native UI thread before
WindowHandle::sendreports back-pressure instead of growing without bound. - MAX_
QUEUED_ WINDOW_ TITLE_ BYTES - Maximum aggregate UTF-8 title bytes buffered for the native UI thread.
- MAX_
WINDOW_ TITLE_ BYTES - Maximum UTF-8 bytes accepted in one queued window title.
Traits§
- Desktop
Frame Backend - Native desktop frame backend contract.
Functions§
- apply_
window_ css - Splice a precomputed window CSS block into rendered HTML in one linear scan.
- find_
packaged_ resources_ dir - Return the packaged bundle resource directory when the executable is running from a desktop package layout.
- is_
allowed_ navigation_ url - Return whether
urlmay be navigated to for an app served fromorigin. - run_
frame_ with - Validate and run a frame with a caller-supplied backend.
- validate_
frame_ capabilities - Validate requested window and shell features before the native shell starts.
- window_
css_ block - Build the constant
<style>block carrying window CSS custom properties. - window_
css_ block_ with_ nonce - Build a trusted window style block for a response with nonce-only
style-src.
Type Aliases§
- Event
Handler - UI-thread lifecycle callback. Handlers must not block the UI thread.
- Result
- Result type used by the WebUI desktop runtime.