GPUs Unleashed! Make Your Games More Powerful With wasi-gfx by Sean Isom & Mendy Berger

Conference: Wasm I/O 2025

Year: 2025

Wasm I/O 2025 - Barcelona, 27-28 March Slides & Repo: https://github.com/renderlet/wasm-io-25 wasi-gfx is a phase 2 proposal that bring GPUs to Wasm through the power of WebGPU. By providing component bindings through wasi-webgpu, as well as supporting functions around frame buffers, surfaces, and input, it is possible to take WebGPU code written for a browser and run it safely in a desktop app in Wasm. wasi-gfx also has wrappers and backends for common graphics interfaces like wgpu, Bevy, webgpu.h, and the WebGPU examples, so existing Wasm and JS code can be rub on WASI hosts without minimal or no modifications. This is a powerful tool to be able to run web applications outside of a browser, as a desktop app or service. But how can these interface with existing applications? Can we bring the security and cross-platform benefits of Wasm to build GPU-enabled plugins as part of an existing game or app? In this talk, we will show how this can be implemented, and do a technical walkthrough of the different components we built to interop with a game engine. Learn how you, too, can leverage wasi-gfx to enable plugins to interact with the GPU as a part of your own application, regardless of architecture. Some of the topics we will cover include: -Building a robust data model for plugins -Drawing into an existing window -Limiting plugin time/resource consumption -Seamless interop between Native C++ host and Rust Wasm engine I-nitializing and sharing resources between DX12 and wasi-webgpu