# Bevy wasm webgpu

> Bevy wasm webgpu is an open-source agent skill for developer tools. Guides Bevy 0.20 games to run in browsers via WASM with WebGPU or WebGL2. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/shinyobjectz/raea-skills/tree/main/skills/bevy/pack/bevy-wasm-webgpu
- **Repository:** https://github.com/shinyobjectz/raea-skills
- **GitHub stars:** 38
- **License:** MIT
- **Skill name:** bevy-wasm-webgpu
- **Collection:** https://github.com/shinyobjectz/raea-skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill covers taking a Bevy 0.20 app to the wasm32-unknown-unknown target for browser delivery. It walks through a trimmed Cargo feature set, a release profile tuned for smaller bundles, and a build sequence using cargo, wasm-bindgen and an optional wasm-opt pass, followed by serving the output and the assets folder over HTTP.

The skill also explains how to attach Bevy to an existing canvas element, keep browser keyboard shortcuts working, and choose the renderer backend and WgpuSettings priority so the app uses WebGPU when available and falls back to WebGL2. It lists version-specific gotchas for moving from Bevy 0.18 and 0.19 to 0.20, including the WESL shader change, mesh shader limits on web, texture compression choices and dropped tasks.

The guide expects a Rust project targeting Bevy 0.20 with the wasm32 toolchain, wasm-bindgen CLI and a static file server. It is written as instructions and reference snippets rather than executable scripts.

## When your agent uses it

> Use when targeting Bevy 0.20 at `wasm32-unknown-unknown`, choosing the `webgl2` or `webgpu` feature, setting `WgpuSettings { backends, priority: WgpuSettingsPriority::WebGPU }`, attaching to a canvas with `Window { canvas, fit_canvas_to_parent }`, generating glue with `wasm-bindgen`, or debugging asset HTTP 404s and `Task` cancellation in the browser.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/shinyobjectz/raea-skills/tree/HEAD/skills/bevy/pack/bevy-wasm-webgpu)
- [License: MIT](https://github.com/shinyobjectz/raea-skills/tree/HEAD/skills/bevy/pack/bevy-wasm-webgpu)

## Features

- **Trimmed Cargo feature set:** Shows which Bevy features to enable explicitly for a browser build to keep the bundle small.
- **Canvas and backend setup:** Covers attaching Bevy to a CSS-selected canvas and selecting WebGPU or WebGL2 through WgpuSettings.
- **Build and serve steps:** Lists the cargo, wasm-bindgen and optional wasm-opt commands plus how assets must be placed for fetching.
- **Bevy 0.20 migration notes:** Summarises breaking changes from 0.18 and 0.19 affecting web builds, such as WESL shaders and task cancellation.
- **Browser troubleshooting:** Points out common browser issues including asset 404s, COOP/COEP headers for threading and time APIs.

## Good for

- Set up a Bevy 0.20 project to compile for the browser
- Choose between WebGL2 and WebGPU for a Bevy web game
- Reduce the size of a Bevy WASM bundle
- Attach a Bevy app to an existing canvas on a web page
- Fix missing asset errors when a Bevy game runs in the browser

## Install

### Claude Code

This skill ships in the `raea` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add shinyobjectz/raea-skills
/plugin install raea@raea
```

Or copy only this skill to `~/.claude/skills/bevy-wasm-webgpu`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/bevy-wasm-webgpu &&
cp -R "$tmp/skills/bevy/pack/bevy-wasm-webgpu" ~/.claude/skills/bevy-wasm-webgpu &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/bevy-wasm-webgpu` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/bevy-wasm-webgpu` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/bevy-wasm-webgpu &&
cp -R "$tmp/skills/bevy/pack/bevy-wasm-webgpu" ~/.agents/skills/bevy-wasm-webgpu &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/bevy-wasm-webgpu` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/bevy-wasm-webgpu` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/bevy-wasm-webgpu &&
cp -R "$tmp/skills/bevy/pack/bevy-wasm-webgpu" ~/.cursor/skills/bevy-wasm-webgpu &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/bevy-wasm-webgpu` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/shinyobjectz/raea-skills.git --path skills/bevy/pack/bevy-wasm-webgpu
```

Or copy the folder to `~/.gemini/skills/bevy-wasm-webgpu` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/bevy-wasm-webgpu`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/bevy-wasm-webgpu &&
cp -R "$tmp/skills/bevy/pack/bevy-wasm-webgpu" ~/.copilot/skills/bevy-wasm-webgpu &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/bevy-wasm-webgpu` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git
```

Then copy `raea-skills/skills/bevy/pack/bevy-wasm-webgpu` into your agent's skills folder as `bevy-wasm-webgpu`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Which Bevy version does Bevy wasm webgpu target?

It targets Bevy 0.20 and includes notes on changes from 0.18 and 0.19.

### Does Bevy wasm webgpu need a particular build tool?

The build steps use cargo for the wasm32-unknown-unknown target, the wasm-bindgen CLI and optionally wasm-opt.

### Can Bevy wasm webgpu handle compute shaders in the browser?

It notes that compute shaders require the WebGPU feature, since WebGL2 has no compute support.

### Are the assets bundled into the WASM file?

No. The guide says assets are served alongside the page and embedding requires a custom asset source.

### How do I install Bevy wasm webgpu in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/bevy-wasm-webgpu to use it in all your projects, or to .claude/skills/bevy-wasm-webgpu in one project. Or install the raea plugin, which includes it: /plugin marketplace add shinyobjectz/raea-skills, then /plugin install raea@raea.

### Does Bevy wasm webgpu run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Bevy wasm webgpu?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Bevy wasm webgpu?

The closest alternatives to Bevy wasm webgpu are Bevy rendering, Bevy vfx, Bevy cargo features, Bevy and Bevy assets.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Bevy rendering](https://ai-powered.com/skills/bevy-rendering): Bevy rendering is an open-source agent skill for developer tools.
- [Bevy vfx](https://ai-powered.com/skills/bevy-vfx): Bevy vfx is an open-source agent skill for developer tools.
- [Bevy cargo features](https://ai-powered.com/skills/bevy-cargo-features): Bevy cargo features is an open-source agent skill for developer tools.
- [Bevy](https://ai-powered.com/skills/bevy-shinyobjectz): Bevy is an open-source agent skill for developer tools.
- [Bevy assets](https://ai-powered.com/skills/bevy-assets): Bevy assets is an open-source agent skill for developer tools.
- [Bevy migration 0 19 to 0 20](https://ai-powered.com/skills/bevy-migration-0-19-to-0-20): Bevy migration 0 19 to 0 20 is an open-source agent skill for developer tools.
- [Bevy pbr materials](https://ai-powered.com/skills/bevy-pbr-materials): Bevy pbr materials is an open-source agent skill for developer tools.
- [Bevy migration 0 18 to 0 19](https://ai-powered.com/skills/bevy-migration-0-18-to-0-19): Bevy migration 0 18 to 0 19 is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/bevy-wasm-webgpu
