1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-22 22:42:48 +03:00
Commit Graph

4 Commits

Author SHA1 Message Date
Wez Furlong
d7ede9fb04
cairo: fix unexpected cfg condition value
This crate references features that were not defined in Cargo.toml.
Add those features, even though we don't use them, so that we are
not warned to death and don't drown in the noise.
2024-09-14 06:53:27 -07:00
Wez Furlong
cb0e1599ac
cairo: fix build on freebsd 2023-08-28 06:51:45 -07:00
Wez Furlong
19ccec6e86
cairo: suppress a bunch of warnings
We can't do anything about warnings in the vendored code, except
pretend they do not exist!
2023-08-20 17:38:25 -07:00
Wez Furlong
58a2a30623
Add vendored cairo-sys-rs crate
I'm experimenting with using cairo's 2D graphics for glyph related
drawing operations, and perhaps more stuff in the UI in the future.

The challenge is that no one has yet encapsulated its build in a
cargo-friendly way.

This commit is that attempt.

The strategy is this:

* `deps/cairo` is ostensibly the same thing as https://github.com/gtk-rs/gtk-rs-core/tree/master/cairo/sys
  which is the cairo-sys-rs crate
* Its build.rs has been replaced with a version that builds from the C
  sources that are found in-tree; it will never look for the system
  cairo library
* A pair of scripts to import pixman (a required dep of cairo) and
  cairo itself in a repeatable way are include, for if/when we need
  to update the vendored sources
  Cairo is a mature library and doesn't release very often.
* The workspace sets a patch for crates.io so that cairo-rs has
  its cairo-sys-rs dep redirected to the local build.

I'm not planning to upstream this stuff to gtk-rs-core as full cairo
depends on a lot more things than are dealt with here, so it would be a
PITA to handle that generally.

This vendoring strips out things that are not used, so the cairo
library that remains:

* Is not internally thread safe; no TLS or mutex support is enabled
  in either of them. That's fine because the high level cairo-rs
  wrapper is not Send+Sync, which means that rust will only allow
  it to be used single threaded anyway.
* Only has the basic recording and image surfaces
* No platform support for win32/xlib/xcb and so on
2023-08-20 14:59:29 -07:00