An abstraction for 2D graphics.
Clone or download
rylev Windows CI (#23)
* Try out windows

* Force unzip without prompting

* Correct wrong folder

* Debug

* Interpolate version

* Add back linux

* Debug again

* Escape debug

* Further debugging

* Concat correctly

* Correct placement of ENV args

* Add back windows and osx

* Add back install of cario on OSX

* Add back other Rust channels

* Always run cargo fmt
Latest commit d235e63 Jan 14, 2019

Piet: a 2D graphics abstraction

Build Status

This repo holds an API for 2D graphics drawing.

The motivation for this crate is set forth in this blog post. Ideally it will become a layer to help druid become cross-platform.

This repo is structured as a core API crate, "piet" and a separate crate for each back-end, currently "piet-direct2d", "piet-cairo", and "piet-web". One motivation for this structure is that additional back-ends can be written without coupling to the main crate, and clients can opt in to the back-ends they need. In addition, it's possible use multiple back-ends, which will likely be useful for testing.

A companion for Bézier path representation and geometry is kurbo.


Since the project is in its infant stages, there's not currently a set roadmap. For a good idea of what the library will eventually be capable of see this list of requirements to be a backend 2D graphics library for the SVG rendering library resvg.


Contributions are welcome! It's in early stages, so there are lots of opportunities to fill things out.

You can find other collaborators at under the #druid stream.


Piet's interface is largely inspired by the Skia Graphics Library as well as the C++ 2D graphics api proposal although piet aims to be much more lightweight and modular.

The Name

The library is of course named after Piet Mondrian. It's abstract and hopefully will be used for drawing lots of rectangles.