cairo-rs

Crates.iocairo-rs
lib.rscairo-rs
version0.22.0-alpha.2
created_at2015-05-12 20:40:49.781555+00
updated_at2026-01-10 09:01:24.559556+00
descriptionRust bindings for the Cairo library
homepagehttps://gtk-rs.org/
repositoryhttps://github.com/gtk-rs/gtk-rs-core
max_upload_size
id2093
size329,453
crates.io (github:gtk-rs:crates-io)

documentation

https://gtk-rs.org/gtk-rs-core/stable/latest/docs/cairo/

README

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.83.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

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.

Commit count: 13684

cargo fmt