#pixels #2D #GPU #framebuffer


A tiny library providing a GPU-powered pixel frame buffer

4 releases

✓ Uses Rust 2018 edition

0.0.4 May 22, 2020
0.0.3 Apr 14, 2020
0.0.2 Nov 4, 2019
0.0.1 Nov 4, 2019

#17 in Rendering

Download history 22/week @ 2020-02-09 30/week @ 2020-02-16 37/week @ 2020-02-23 13/week @ 2020-03-01 58/week @ 2020-03-08 45/week @ 2020-03-15 87/week @ 2020-03-22 107/week @ 2020-03-29 53/week @ 2020-04-05 138/week @ 2020-04-12 52/week @ 2020-04-19 33/week @ 2020-04-26 60/week @ 2020-05-03 137/week @ 2020-05-10 112/week @ 2020-05-17 53/week @ 2020-05-24

296 downloads per month
Used in 4 crates

MIT and MPL-2.0 licenses

584 lines

Documentation Build status CI Average time to resolve an issue Percentage of issues still open Unsafe forbidden

Pixels Logo

A tiny hardware-accelerated pixel frame buffer. 🦀

But why?

Rapidly prototype a simple 2D game, pixel-based animations, software renderers, or an emulator for your favorite platform. Then add shaders to simulate a CRT or just to spice it up with some nice VFX.

pixels is more than just a library to push pixels to a screen, but less than a full framework. You're in charge of managing a window environment, event loop, and input handling.


  • Built on modern graphics APIs powered by wgpu: DirectX 12, Vulkan, Metal, OpenGL.
  • Use your own custom shaders for special effects. (WIP)
  • Hardware accelerated scaling on perfect pixel boundaries.
  • Supports non-square pixel aspect ratios. (WIP)


Comparison with minifb

The minifb crate shares some similarities with pixels; it also allows rapid prototyping of 2D games and emulators. But it requires the use of its own window/GUI management, event loop, and input handling. One of the disadvantages with the minifb approach is the lack of hardware acceleration (except on macOS, which uses Metal but is not configurable). An advantage is that it relies on fewer dependencies.


~111K SLoC