qmetrics.net

wgpu

Cross-platform safe Rust graphics API

wgpu screenshot

wgpu implements the WebGPU-style API in Rust for native and WebAssembly targets. It backs Firefox, Servo, and Deno WebGPU integration and maps to Vulkan, Metal, D3D12, and GLES.

Overview

wgpu is a graphics and compute library that follows the WebGPU standard while remaining idiomatic Rust. Applications use one API whether they run on desktop GPUs or inside wasm in a browser.

Native backends include Vulkan, Metal, DirectX 12, and OpenGL or GLES, with translation layers where needed. On the web, targets include WebGPU and WebGL2. The crate is the foundation for WebGPU in Firefox, Servo, and Deno.

Shaders use WGSL, translated by the Naga component to each backend's shading language when not delegating to the browser's WebGPU implementation. Examples and documentation modules cover architecture patterns and debugging.

Bindings and wrappers exist for many languages through wgpu-native and community projects. Environment variables select backends, adapters, and DirectX shader compilers during development and testing.

Key features

  • WebGPU-standard Rust API
  • Vulkan, Metal, DX12, OpenGL backends
  • WebAssembly WebGPU and WebGL2
  • WGSL via Naga translation
  • General-purpose GPU compute
  • wgpu-native C bindings
  • Configurable backend selection
  • Firefox and Deno integration

Use cases

  • Rust game and engine rendering
  • Cross-platform GPU applications
  • Browser graphics via wasm
  • Graphics research prototypes
  • Bindings for other languages

Tags

Similar software

Bevy Engine

Rust game engine with ECS architecture

Bevy Engine is a data-driven Rust game engine for 2D and 3D work. It emphasizes modularity, parallel execution, and fast iteration while the project remains under active development.

★ 50k⟳ yesterdayApache-2.0
Open Source Alternative to:Unity

Phaser

HTML5 2D game framework with Canvas and WebGL

Phaser is a JavaScript and TypeScript framework for browser games on desktop and mobile, with scene APIs, physics, animations, and loaders. Games can target embed platforms or wrap for native stores via third-party tooling

★ 40.8k⟳ 3 months agoMIT

raylib

Minimal C library for games and graphical programs

raylib is a C99 graphics and game programming library with no mandatory external dependencies. It suits prototypes, tools, education, and embedded targets across desktop, mobile, and web.

★ 35.8k⟳ todayZlib
Frameworks & PlatformsDesktop/CLI app

Matter.js

JavaScript two-dimensional rigid body physics engine

Matter.js simulates 2D rigid-body physics for browser games and interactive pages. It runs in modern browsers and Node.js with canvas rendering and touch-friendly controls.

★ 18.7k⟳ 1 month agoMIT
Frameworks & PlatformsDesktop/CLI app

GLFW

Cross-platform windowing library for OpenGL and Vulkan

GLFW is a C library that creates windows, graphics contexts, and surfaces while handling input and events. It targets OpenGL, OpenGL ES, and Vulkan on desktop and Unix-like systems.

★ 15.5k⟳ 3 months agoZlib
Frameworks & PlatformsDesktop/CLI app

Bullet3

Real-time collision and multi-physics simulation SDK

Bullet Physics SDK provides real-time collision detection and multi-physics simulation for games, visual effects, VR, robotics, and machine learning. PyBullet Python bindings are recommended for robotics and RL workflows.

★ 14.9k⟳ 1 month agoZlib · open core
Frameworks & PlatformsDesktop/CLI app