{"id":13407529,"url":"https://github.com/linebender/piet","last_synced_at":"2025-05-12T13:15:44.493Z","repository":{"id":37856911,"uuid":"163801282","full_name":"linebender/piet","owner":"linebender","description":"An abstraction for 2D graphics.","archived":false,"fork":false,"pushed_at":"2024-12-21T16:57:23.000Z","size":1676,"stargazers_count":1301,"open_issues_count":70,"forks_count":95,"subscribers_count":35,"default_branch":"main","last_synced_at":"2025-05-07T23:34:14.009Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linebender.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-02T06:09:58.000Z","updated_at":"2025-04-21T10:28:55.000Z","dependencies_parsed_at":"2022-07-10T15:00:21.764Z","dependency_job_id":"8bbd760f-faa3-4b97-bb3c-9980128f6c15","html_url":"https://github.com/linebender/piet","commit_stats":{"total_commits":608,"total_committers":58,"mean_commits":"10.482758620689655","dds":0.6036184210526316,"last_synced_commit":"88e8e6c6fe41d8c99e3bccbf3a076b3661c4472a"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linebender%2Fpiet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linebender%2Fpiet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linebender%2Fpiet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linebender%2Fpiet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linebender","download_url":"https://codeload.github.com/linebender/piet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253745196,"owners_count":21957319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T20:00:42.211Z","updated_at":"2025-05-12T13:15:44.420Z","avatar_url":"https://github.com/linebender.png","language":"Rust","funding_links":[],"categories":["2D Graphics Abstractions"],"sub_categories":[],"readme":"![image of piet logo](./misc/piet-logo.png)\n\n\u003cdiv align=\"center\"\u003e\n\n# Piet\n\n**A 2D graphics abstraction**\n\n[![Latest published version.](https://img.shields.io/crates/v/piet.svg)](https://crates.io/crates/piet)\n[![Documentation build status.](https://img.shields.io/docsrs/piet.svg)](https://docs.rs/piet)\n[![Apache 2.0 or MIT license.](https://img.shields.io/badge/license-Apache--2.0_OR_MIT-blue.svg)](#license)\n\n[![Linebender Zulip chat.](https://img.shields.io/badge/Linebender-%23piet-blue?logo=Zulip)](https://xi.zulipchat.com/#narrow/channel/259397-piet)\n[![GitHub Actions CI status.](https://img.shields.io/github/actions/workflow/status/linebender/piet/ci.yml?logo=github\u0026label=CI)](https://github.com/linebender/piet/actions)\n[![Dependency staleness status.](https://deps.rs/repo/github/linebender/piet/status.svg)](https://deps.rs/repo/github/linebender/piet)\n\n\u003c/div\u003e\n\nCross-platform 2D graphics.\n\nThe Piet project consists of a core crate (`piet`) which describes a 2D graphics API,\nand a number of \"backends\", which implement that API on top of the built-in\n2D graphics system of a given platform. This allows the same drawing code to be\nused on different platforms, without having to bundle a full 2D renderer.\n\nThe motivation for this crate is set forth in this [blog post]. It is used as\nthe basis of [Druid], a cross-platform GUI toolkit.\n\nA companion for Bézier path representation and geometry is [kurbo].\n\n## Getting started\n\nRunning the examples requires that submodules be checked out. From the root\ndirectory, run\n\n```sh\ngit submodule update --init\n```\n\n## Contributing\n\n### Piet is in maintenance mode.\n\nPiet has largely stabilized, and no major API additions are planned by the\noriginal developers. Bug fixes and performance improvements are welcome.\n\nIf there is a significant feature you would like to add that can be discussed.\nFor a new feature to be considered, there must be a plan for how it would be\nimplemented in at least the coregraphics, direct2d, and cairo backends, and the\nactual implementation should include support for at least two of these.\n\nFor questions and discussions we use a zulip chat instance at [xi.zulipchat.com][zulip]\nunder the #piet stream.\n\n## Backends\n\n*For cross-platform use, the [`piet-common`][] crate reexports the most\nappropriate implementation for the current target.*\n\n#### `piet-cairo` [![crates.io](https://img.shields.io/crates/v/piet-cairo)](https://crates.io/crates/piet-cairo)\n\nThe `piet-cairo` crate depends on the [cairo library][]. A simple test of the cairo\nbackend is to run `cargo run --example test-picture 0` in the `piet-cairo` directory,\nwhich should produce an image file called `cairo-test-00-2.00.png`.\n\n#### `piet-coregraphics` [![crates.io](https://img.shields.io/crates/v/piet-coregraphics)](https://crates.io/crates/piet-coregraphics)\n\nThe `piet-coregraphics` crate works on macOS only. A simple test of the coregraphics\nbackend is to run `cargo run --example test-picture 0` in the `piet-coregraphics` directory,\nwhich should produce an image file called `coregraphics-test-00-2.00.png`.\n\n#### `piet-direct2d` [![crates.io](https://img.shields.io/crates/v/piet-direct2d)](https://crates.io/crates/piet-direct2d)\n\nThe `piet-direct2d` crate works on Windows only. A simple test of the direct2d\nbackend is to run `cargo run --example test-picture 0` in the `piet-direct2d` directory,\nwhich should produce an image called `d2d-test-00-2.00.png`.\n\n#### `piet-svg` [![crates.io](https://img.shields.io/crates/v/piet-svg)](https://crates.io/crates/piet-svg)\n#### `piet-web` [![crates.io](https://img.shields.io/crates/v/piet-web)](https://crates.io/crates/piet-web)\n\n## Minimum supported Rust Version (MSRV)\n\nThis version of Piet has been verified to compile with **Rust 1.77** and later.\n\nFuture versions of Piet might increase the Rust version requirement.\nIt will not be treated as a breaking change and as such can even happen with small patch releases.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick here if compiling fails.\u003c/summary\u003e\n\nAs time has passed, some of Piet's dependencies could have released versions with a higher Rust requirement.\nIf you encounter a compilation issue due to a dependency and don't want to upgrade your Rust toolchain, then you could downgrade the dependency.\n\n```sh\n# Use the problematic dependency's name and version\ncargo update -p package_name --precise 0.1.1\n```\n\n\u003c/details\u003e\n\n## Community\n\nDiscussion of Piet development happens in the [Linebender Zulip](https://xi.zulipchat.com/), specifically the [#piet stream](https://xi.zulipchat.com/#narrow/channel/259397-piet).\nAll public content can be read without logging in.\n\nContributions are welcome by pull request.\nThe [Rust code of conduct] applies.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache 2.0 license, shall be licensed as noted in the [License](#license) section, without any additional terms or conditions.\n\n## Inspirations\n\nPiet'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.\n\n## The Name\n\nThe library is named after [Piet Mondrian]. It is abstract and intended to be used for drawing lots of rectangles.\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n[blog post]: https://raphlinus.github.io/rust/graphics/2018/10/11/2d-graphics.html\n[Druid]: https://github.com/xi-editor/druid\n[kurbo]: https://github.com/linebender/kurbo\n[zulip]: https://xi.zulipchat.com\n[Skia Graphics Library]: https://skia.org\n[C++ 2D graphics api proposal]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0267r8.pdf\n[Piet Mondrian]: https://en.wikipedia.org/wiki/Piet_Mondrian\n[`piet-common`]: https://crates.io/crates/piet-common\n[cairo library]: https://www.cairographics.org/download/\n[Rust code of conduct]: https://www.rust-lang.org/policies/code-of-conduct\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinebender%2Fpiet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinebender%2Fpiet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinebender%2Fpiet/lists"}