Rust Rewrite Index

cairo

Cairo 2D vector graphics library

Rust efforts

Research record · 2026-11-29

Searched Cairo 2D graphics, Mozilla Cairo Rust port, Win32 printing and Rust bindings. Mozilla documents an out-of-tree port aimed specifically at a Windows printing surface; cairo-rs is a binding and does not port Cairo.

Original source check. The packaged source scan found zero files with the .rs suffix. This covers the Debian 13 snapshot and excludes common vendor directories. Independent repositories are outside this count.

Rust component

Mozilla Cairo Windows printing experiment

Out-of-tree LLM-assisted Cairo-to-Rust port proposed for Firefox; author says it focuses on a usable Win32 printing surface, and its tests and fuzzers were not included in the attached commit. Not a full Cairo replacement.

Evidence checked 2026-11-29

Project structure

Cairo is a multi-platform library providing anti-aliased vector-based rendering for multiple target backends. Paths consist of line segments and cubic splines and can be rendered at any width with various join and cap styles. All colors may be specified with optional translucence (opacity/alpha) and combined using the extended Porter/Duff compositing algebra as found in the X Render Extension.

Inside the source tree

Source files by extension in this snapshot · C (738), Python (5), C++ (1)

Selected components packaged from this source in Debian 13.

  • libcairo2 · Cairo 2D vector graphics library
  • libcairo-gobject2 · Cairo 2D vector graphics library (GObject library)
  • libcairo-script-interpreter2 · Cairo 2D vector graphics library (script interpreter)
  • libcairo2-dev · Development files for the Cairo 2D graphics library
  • libcairo2-doc · Documentation for the Cairo Multi-platform 2D graphics library