WebGPU Browser Setup
WebGPU enables GPU-accelerated compute in the browser, providing 50-100x speedups for analytics workloads. However, browser support requires specific configuration.
Browser Support Status (November 2025)
| Browser | WebGPU Status | Notes |
|---|---|---|
| Chrome 113+ | Supported | May require flags on some GPUs |
| Edge 113+ | Supported | Chromium-based, same as Chrome |
| Firefox 121+ | Experimental | Enable in about:config |
| Safari 17+ | Supported | macOS/iOS only |
Chrome WebGPU Blocklist Issue
Starting with Chrome 142 (November 2025), Chrome began blocklisting WebGPU on certain GPU configurations. This affects many users even with capable hardware.
Symptoms
When WebGPU is blocklisted, you'll see:
- trueno-db demo shows "SIMD128 Compute" instead of "WebGPU Compute"
- Console shows:
trueno-db WASM initializedbut no WebGPU adapter chrome://gpushows:WebGPU: Disabled WebGPU has been disabled via blocklist or the command line
Diagnosis
- Open
chrome://gpuin Chrome - Search for "WebGPU" in the page
- Look for these indicators:
Blocklisted (bad):
WebGPU: Disabled
WebGPU has been disabled via blocklist or the command line
Working (good):
WebGPU: Hardware accelerated
Solution 1: Enable via Chrome Flags
- Open
chrome://flagsin Chrome - Search for "WebGPU"
- Set "Unsafe WebGPU Support" to Enabled
- Click "Relaunch" to restart Chrome
Direct link: chrome://flags/#enable-unsafe-webgpu
Solution 2: Launch Chrome with Command Line Flag
# Linux
google-chrome --enable-features=WebGPU
# macOS
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-features=WebGPU
# Windows
"C:\Program Files\Google\Chrome\Application\chrome.exe" --enable-features=WebGPU
Solution 3: Use a Different Browser
Firefox and Safari have independent WebGPU implementations that may not be affected by Chrome's blocklist.
Firefox:
- Open
about:config - Search for
dom.webgpu.enabled - Set to
true
Safari: WebGPU is enabled by default on Safari 17+ (macOS Sonoma / iOS 17+).
Verifying WebGPU Works
Method 1: trueno-db Demo
- Run
make wasm-servein the trueno-db directory - Open
http://localhost:8080in your browser - Look for the compute badge:
- "WebGPU Compute" (blue) = WebGPU working
- "SIMD128 Compute" (green) = Fallback to SIMD
- "Scalar Compute" (orange) = No acceleration
Method 2: Browser Console
// Check if WebGPU API exists
console.log('WebGPU API:', typeof navigator.gpu);
// Request adapter
const adapter = await navigator.gpu?.requestAdapter();
console.log('Adapter:', adapter);
// Get adapter info
if (adapter) {
const info = await adapter.requestAdapterInfo();
console.log('GPU:', info.vendor, info.device);
}
Method 3: WebGPU Samples
Visit WebGPU Samples - if the samples work, WebGPU is enabled.
Performance Tiers
trueno-db automatically detects and uses the best available compute tier:
| Tier | Detection | Performance | Use Case |
|---|---|---|---|
| WebGPU | navigator.gpu.requestAdapter() | 50-100x | Large datasets (>100K rows) |
| SIMD128 | WASM feature detection | 4-8x | Medium datasets |
| Scalar | Always available | 1x (baseline) | Small datasets |
Troubleshooting Detection
If WebGPU detection fails even after enabling:
1. Check GPU Driver Version
Outdated GPU drivers can cause WebGPU to fail initialization:
# Linux (NVIDIA)
nvidia-smi
# Linux (AMD)
vulkaninfo | grep "GPU"
# macOS
system_profiler SPDisplaysDataType
2. Check Dawn Backend
Chrome uses Dawn (Google's WebGPU implementation). Check chrome://gpu for Dawn info:
Dawn Info
[WebGPU Status]: Available
[Backend]: Vulkan / Metal / D3D12
If Dawn shows "Software" or "Unavailable", WebGPU won't work efficiently.
3. Virtual Machines
WebGPU typically doesn't work in VMs without GPU passthrough:
- Docker: Use
--gpus allflag - WSL2: Requires WSLg with GPU support
- VMware/VirtualBox: Limited support
WASM SIMD128 Fallback
When WebGPU isn't available, trueno-db falls back to WASM SIMD128, which provides 4-8x speedup over scalar code.
SIMD128 requires:
- Chrome 91+, Firefox 89+, Safari 16.4+
- WASM built with
+simd128target feature
Build command:
RUSTFLAGS="-C target-feature=+simd128" wasm-pack build --target web
Known Issues
Chrome 142+ Blocklist (November 2025)
Chrome 142 added many GPUs to the WebGPU blocklist for stability reasons. This is a Chrome policy decision, not a hardware limitation.
Workaround: Use chrome://flags/#enable-unsafe-webgpu
Firefox WebGPU Experimental
Firefox WebGPU is still in development and may have compatibility issues with some WebGPU features.
Status: Check about:support → Graphics → WebGPU
Safari Metal Limitations
Safari uses Metal backend which has some WebGPU feature gaps. Most trueno-db operations work, but advanced features may differ.
Getting Help
If you continue to experience WebGPU issues:
- Check chrome://gpu and save the report
- File an issue at trueno-db GitHub
- Include:
- Browser version
- OS version
- GPU model
- chrome://gpu report (attach as file)
- Console errors