#cairo #gnome #gui #gtk-rs

cairo-rs

Rust bindings for the Cairo library

39 releases

new 0.17.0 Feb 8, 2023
0.16.7 Dec 16, 2022
0.16.3 Nov 13, 2022
0.15.12 Jun 27, 2022
0.0.4 Jul 18, 2015

#32 in GUI

Download history 16020/week @ 2022-10-20 17398/week @ 2022-10-27 21311/week @ 2022-11-03 20459/week @ 2022-11-10 18665/week @ 2022-11-17 15878/week @ 2022-11-24 17056/week @ 2022-12-01 24272/week @ 2022-12-08 19253/week @ 2022-12-15 18626/week @ 2022-12-22 18061/week @ 2022-12-29 21425/week @ 2023-01-05 18857/week @ 2023-01-12 20026/week @ 2023-01-19 21856/week @ 2023-01-26 25080/week @ 2023-02-02

90,818 downloads per month
Used in 429 crates (104 directly)

MIT license

790KB
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.64.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

Documentation features

  • dox - Used to keep system dependent items in 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

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

~0.3–2.4MB
~51K SLoC