46 releases

0.19.2 Feb 13, 2024
0.18.5 Dec 30, 2023
0.18.3 Nov 3, 2023
0.18.0 Jul 23, 2023
0.0.4 Jul 18, 2015

#3 in Images

Download history 50370/week @ 2023-11-27 49541/week @ 2023-12-04 52642/week @ 2023-12-11 47444/week @ 2023-12-18 40210/week @ 2023-12-25 43920/week @ 2024-01-01 45548/week @ 2024-01-08 46671/week @ 2024-01-15 47368/week @ 2024-01-22 47818/week @ 2024-01-29 50720/week @ 2024-02-05 50432/week @ 2024-02-12 49499/week @ 2024-02-19 54561/week @ 2024-02-26 57357/week @ 2024-03-04 23268/week @ 2024-03-11

190,315 downloads per month
Used in 612 crates (118 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

~2–12MB
~120K SLoC