#gpu #graphics #2d


Toolkit for creating GPU accelerated 2D graphics applications

9 releases (4 breaking)

new 0.5.1 Feb 11, 2024
0.5.0 Dec 11, 2023
0.4.1 Dec 4, 2023
0.4.0 Oct 12, 2023
0.1.0 Mar 6, 2023

#340 in Graphics APIs

Download history 27/week @ 2023-10-21 27/week @ 2023-10-28 24/week @ 2023-11-04 27/week @ 2023-11-11 26/week @ 2023-11-18 44/week @ 2023-11-25 109/week @ 2023-12-02 366/week @ 2023-12-09 258/week @ 2023-12-16 76/week @ 2023-12-23 17/week @ 2023-12-30 30/week @ 2024-01-06 24/week @ 2024-01-13 17/week @ 2024-01-20 29/week @ 2024-01-27 11/week @ 2024-02-03

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

LGPL-3.0-or-later OR MPL-2.0

2.5K SLoC


piet-hardware is a strategy for implementing the piet drawing interface using GPU primitives. The goal is to break down the drawing operations to rendering textured triangles. The resulting buffers are than passed to the GPU backend for rendering.

As piet-hardware simply implements the high-level strategy, it has no unsafe code. The actual GPU calls are forwarded to an object that implements GpuContext. This object is intended to be an interface to OpenGL, Vulkan, Metal, or other GPU APIs.

Source Code

The canonical code for this repository is kept on Codeberg. For convenience, a mirror is kept on GitHub.


piet-hardware is free software: you can redistribute it and/or modify it under the terms of either:

  • GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  • Mozilla Public License as published by the Mozilla Foundation, version 2.

piet-hardware is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the Mozilla Public License for more details.

You should have received a copy of the GNU Lesser General Public License and the Mozilla Public License along with piet-hardware. If not, see https://www.gnu.org/licenses/ or https://www.mozilla.org/en-US/MPL/2.0/.


~320K SLoC