Open-Source Wikis

/

wgpu

/

Crates

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:

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 --> wgpu

What's published vs. vendored

Most crates here are published to crates.io. The exceptions:

  • cts_runner, deno_webgpu — vendored. Excluded from default-members (root Cargo.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.

Crates – wgpu wiki | Factory