Skip to main content

Module browser

Module browser 

Source
Expand description

Browser runtime — unified WebGPU (async) + WebGL fallback + CPU.

Call init_webgpu once at startup on wasm, then use BrowserSession to compile and run graphs through the same backend registry as native code.

Re-exports§

pub use device_ext::BROWSER_DEVICE_PRIORITY as browser_device_priority;

Structs§

BrowserCompiledGraph
A graph compiled for a browser backend.
BrowserError
Error from browser compile/run preflight.
BrowserSession
Session targeting a browser backend (WebGpu preferred, then OpenGl, then Cpu).

Functions§

available_browser_devices
Available browser backends in priority order.
browser_block_reason
Diagnostic when no browser backend can run graph.
init_webgpu
preferred_browser_device
Highest-priority live browser backend.
supports_browser_graph
Is graph runnable on any available browser backend?