Hi! Sharing a small demo project using wasi:webgpu from a JS host (FYI).
Repository: https://github.com/ritalin/egui-wasi-webgpu-demo
Online demo: https://ritalin.github.io/egui-wasi-webgpu-demo/
WASM is transpiled to JavaScript using @bytecodealliance/jco
Tested on Chrome 145 on MacOS Ventura.
What this demo shows
GPUDevicePipeline:
egui (WASM layout) -> paint commands -> wasi:webgpu calls -> JS shim -> real WebGPU
Limitations
as unknown as RenderContext
This appears to be due to TypeScript type incompatibilities between generated bindings and host shim types.
Hope this is useful as a reference for a JS-hosted wasi:webgpu workflow.
fun!!!!
Last updated: Feb 24 2026 at 04:36 UTC