Module backend

Module backend 

Source
Expand description

WebGPU and cross-platform backend support for rendering.

This module provides utilities for selecting and configuring rendering backends across different platforms. It handles:

  • Platform detection (Linux, macOS, Windows, WSL2)
  • Backend preference ordering (native > WebGPU > software)
  • Environment configuration (WGPU_BACKEND, etc.)
  • Fallback strategies for restricted environments

Structs§

BackendConfig
Configuration for backend selection

Enums§

Platform
Detected platform and rendering environment
RenderBackend
Available rendering backends

Functions§

detect_platform
Detect the current platform
has_display
Check if a display is available for windowed rendering
is_wsl2
Check if running on WSL2 (Windows Subsystem for Linux 2)