gfx-rs/wgpu
Crates
This repository is a Cargo workspace. Every meaningful subsystem is a published or vendored crate; this section documents each one.
The crates fall into four broad groups:
- The
wgputriangle — the layered implementation of WebGPU on native targets:wgpu,wgpu-core,wgpu-hal. Plus their shared-types helperwgpu-types, proc-macroswgpu-macros, and thewgpu-naga-bridgethat connects the triangle to naga. - The
nagafamily — the shader translator and its associated tools:naga,naga-cli,naga-test, and the helper cratehlsl-snapshots. - Embedders and tools —
deno_webgpu(Deno's WebGPU bindings),cts_runner(WebGPU CTS via Deno),player(trace replay),wgpu-info,lock-analyzer. - Test, bench, and example harnesses —
tests,benches,examples, andxtask.
graph TD
subgraph user[User-facing]
wgpu[wgpu]
end
subgraph core[Implementation]
wgpucore[wgpu-core]
wgpuhal[wgpu-hal]
end
subgraph shared[Shared]
types[wgpu-types]
bridge[wgpu-naga-bridge]
macros[wgpu-macros]
end
subgraph naga[naga family]
nagacrate[naga]
nagacli[naga-cli]
nagatest[naga-test]
end
subgraph embedders[Embedders]
deno[deno_webgpu]
cts[cts_runner]
end
subgraph tools[Tools and tests]
info[wgpu-info]
player[player]
lockanalyzer[lock-analyzer]
tests[tests]
benches[benches]
examples[examples]
xtask[xtask]
end
wgpu --> wgpucore
wgpucore --> wgpuhal
wgpucore --> bridge
bridge --> nagacrate
wgpu --- types
wgpucore --- types
wgpuhal --- types
nagacli --> nagacrate
deno --> wgpucore
cts --> deno
player --> wgpucore
info --> wgpu
tests --> wgpu
benches --> wgpu
examples --> wgpuWhat's published vs. vendored
Most crates here are published to crates.io. The exceptions:
cts_runner,deno_webgpu— vendored. Excluded fromdefault-members(rootCargo.toml) and require Deno-flavored deps.xtask,naga/xtask— workspace automation only. Never published.tests,benches,examples/features,examples/standalone/*,examples/bug-repro/*,lock-analyzer,naga-test,naga/fuzz,naga/hlsl-snapshots,wgpu-core/platform-deps/*— internal helpers, not published.wgpu-info,naga-cli,player— published as binaries.
The published crates form a single coherent version line: wgpu, wgpu-core, wgpu-hal, wgpu-types, wgpu-macros, naga, and wgpu-naga-bridge all currently sit at 29.0.0 (workspace.package.version in the root Cargo.toml).
Versioning
The repository pins versions for every workspace dependency in the root Cargo.toml's [workspace.dependencies] table. Crates inside the workspace inherit version = "29.0.0" via workspace = true. The [patch.crates-io] table forces examples and downstream crates to use the in-tree wgpu even when transitive dependencies pull in a published version.
How to read this section
Each crate page covers:
- What the crate is for and where it sits in the architecture.
- Its directory layout.
- Key abstractions (types, traits, modules) with file paths.
- How it integrates with neighbouring crates.
- Where to start when modifying it.
Pages with sub-pages (wgpu-hal/, naga/) drill into individual backends/areas.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.