#2d-graphics #canvas #wgpu #graphics

wgpu_canvas

A 2D WGPU renderer API for drawing text, shapes, and images with Rust

11 stable releases (4 major)

4.0.1 May 11, 2025
3.2.0 May 11, 2025
3.1.0 Mar 7, 2025
3.0.0 Feb 12, 2025
0.1.1 Feb 3, 2025

#291 in GUI

Download history 185/week @ 2025-01-29 173/week @ 2025-02-05 500/week @ 2025-02-12 11/week @ 2025-02-19 10/week @ 2025-02-26 144/week @ 2025-03-05 4/week @ 2025-03-12 2/week @ 2025-04-09 2/week @ 2025-04-23 383/week @ 2025-05-07 112/week @ 2025-05-14

497 downloads per month
Used in 3 crates (2 directly)

BSD-3-Clause

62KB
1.5K SLoC

Rust 1K SLoC // 0.0% comments WebGPU Shader Language 391 SLoC

wgpu_canvas

wgpu_canvas is a lightweight, high-performance canvas abstraction layer for Rust applications using wgpu. It provides an intuitive API for drawing text, shapes, and images — all rendered with GPU acceleration and zero JavaScript.

Perfect for Rust-first game engines, UI toolkits, and creative coding frameworks.

✨ Features

  • Draw shapes (rectangles, ellipses) with ease
  • Render images and textures onto a canvas
  • Text rendering powered by GPU font caching
  • Built directly on top of wgpu for maximum performance
  • 100% Rust

🚀 Getting Started

Add wgpu_canvas to your Cargo.toml:

[dependencies] wgpu_canvas = "1.0.0"

📚 Documentation

Full documentation is available at https://docs.rs/wgpu_canvas

Dependencies

~39MB
~641K SLoC