50 releases

0.20.5 Oct 30, 2024
0.20.0 Jul 10, 2024
0.19.2 Feb 13, 2024
0.18.5 Dec 30, 2023
0.0.4 Jul 18, 2015

#15 in Images

Download history 61085/week @ 2024-07-18 63289/week @ 2024-07-25 65643/week @ 2024-08-01 68374/week @ 2024-08-08 63917/week @ 2024-08-15 69311/week @ 2024-08-22 73090/week @ 2024-08-29 70718/week @ 2024-09-05 69114/week @ 2024-09-12 68898/week @ 2024-09-19 78071/week @ 2024-09-26 76691/week @ 2024-10-03 79399/week @ 2024-10-10 77492/week @ 2024-10-17 75385/week @ 2024-10-24 82047/week @ 2024-10-31

327,460 downloads per month
Used in 751 crates (121 directly)

MIT license

1MB
20K SLoC

Cairo bindings

Rust bindings for Rust and wrappers for Cairo, part of gtk-rs-core.

screenshot

Cairo 1.14 is the lowest supported version for the underlying library.

Minimum supported Rust version

Currently, the minimum supported Rust version is 1.70.0.

Default-on features

  • use_glib - Use with glib

Fileformat features

  • png - Reading and writing PNG images
  • pdf - Rendering PDF documents
  • svg - Rendering SVG documents
  • ps - Rendering PostScript documents

Cairo API version features

  • v1_16 - Use Cairo 1.16 APIs

Documentation

X Window features

  • xcb - X Window System rendering using the XCB library
  • xlib - X Window System rendering using XLib

Windows API features

  • win32-surface - Microsoft Windows surface support

Documentation rustdoc attributes

  • docsrs - Used to keep system dependent items in documentation

Using

We recommend using crates from crates.io, as demonstrated here.

If you want to track the bleeding edge, use the git dependency instead:

[dependencies]
cairo-rs = { git = "https://github.com/gtk-rs/gtk-rs-core.git", package = "cairo-rs" }

Avoid mixing versioned and git crates like this:

# This will not compile
[dependencies]
cairo-rs = "0.13"
cairo-rs = { git = "https://github.com/gtk-rs/gtk-rs-core.git", package = "cairo-rs" }

See Also

License

cairo is available under the MIT License, please refer to it.

Dependencies

~1.2–10MB
~108K SLoC