Crate cairo[][src]

Expand description

Cairo bindings

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


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

Minimum supported Rust version

Currently, the minimum supported Rust version is 1.54.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 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


We recommend using crates from, as demonstrated here.

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

cairo-rs = { git = "", package = "cairo-rs" }

Avoid mixing versioned and git crates like this:

cairo-rs = "0.13"
cairo-rs = { git = "", package = "cairo-rs" }

See Also


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


pub use ffi;
pub use freetype_crate as freetype;
pub use glib;



FtSynthesizefreetype or dox
PdfMetadatapdf or dox
PdfVersionpdf or dox
PsLevelps or dox
ScriptModescript or dox
SvgUnitsvg and v1_16, or dox
SvgVersionsvg or dox


CAIRO_TAG_DESTv1_16 or dox
CAIRO_TAG_LINKv1_16 or dox
MIME_TYPE_EPSv1_16 or dox
PDF_OUTLINE_ROOTv1_16 or dox


Type Definitions