Skip to main content

global_context

Function global_context 

Source
pub fn global_context() -> Option<Arc<WebGPUContext>>
Expand description

Returns the shared WebGPUContext, or None if no adapter is available.

Initializes the singleton device once; all subsequent calls return the cached value.