Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
Unpiet (#17)
Browse files Browse the repository at this point in the history
* Fixing Cargo.toml specification in CI.

* Trying to apply macOS clippy suggestion.

* Merging in dfrg/unpiet.

* unpiet x11 backend (#14)

- make x11 backend default because gtk backend does not support raw-window-handle
- remove custom cursors (needs piet)

* Clippy lints.

* X11 clippy lints.

* Fixing macOS clippy lints.

* Tinkering with Wayland.

* Simplify the conditional compilation cfg for the shared.

* More mac clippy lints.

Co-authored-by: Brian Merchant <[email protected]>
Co-authored-by: Manmeet Singh <[email protected]>
  • Loading branch information
3 people authored Oct 20, 2022
1 parent 33da650 commit ffc26a9
Show file tree
Hide file tree
Showing 33 changed files with 1,451 additions and 2,114 deletions.
43 changes: 20 additions & 23 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ rustdoc-args = ["--cfg", "docsrs"]
default-target = "x86_64-pc-windows-msvc"

[features]
default = ["gtk"]
gtk = ["gdk-sys", "glib-sys", "gtk-sys", "gtk-rs"]
default = ["x11"]
gtk = ["cairo-rs", "gdk-sys", "glib-sys", "gtk-sys", "gtk-rs"]
x11 = [
"ashpd",
"bindgen",
"cairo-sys-rs",
"futures",
"nix",
"pkg-config",
Expand All @@ -39,31 +38,29 @@ wayland = [
"bindgen",
"pkg-config",
]
# Implement HasRawWindowHandle for WindowHandle
raw-win-handle = ["raw-window-handle"]

# passing on all the image features. AVIF is not supported because it does not
# support decoding, and that's all we use `Image` for.
image_png = ["piet-common/image_png"]
jpeg = ["piet-common/jpeg"]
jpeg_rayon = ["piet-common/jpeg_rayon"]
gif = ["piet-common/gif"]
bmp = ["piet-common/bmp"]
ico = ["piet-common/ico"]
tiff = ["piet-common/tiff"]
webp = ["piet-common/webp"]
pnm = ["piet-common/pnm"]
dds = ["piet-common/dds"]
tga = ["piet-common/tga"]
farbfeld = ["piet-common/farbfeld"]
dxt = ["piet-common/dxt"]
hdr = ["piet-common/hdr"]
bmp = []
dds = []
dxt = []
farbfeld = []
gif = []
jpeg = []
png = []
ico = []
tiff = []
webp = []
tga = []
hdr = []
image_png = []
jpeg_rayon = []
pnm = []
serde = ["kurbo/serde"]

[dependencies]
# NOTE: When changing the piet or kurbo versions, ensure that
# the kurbo version included in piet is compatible with the kurbo version specified here.
piet-common = "=0.5.0"
kurbo = "0.8.2"

tracing = "0.1.22"
Expand All @@ -76,7 +73,7 @@ keyboard-types = { version = "0.6.2", default_features = false }

# Optional dependencies
image = { version = "0.23.12", optional = true, default_features = false }
raw-window-handle = { version = "0.5.0", optional = true, default_features = false }
raw-window-handle = { version = "0.4.2", default_features = false }

[target.'cfg(target_os="windows")'.dependencies]
scopeguard = "1.1.0"
Expand All @@ -100,7 +97,7 @@ bitflags = "1.2.1"
[target.'cfg(any(target_os = "freebsd", target_os="linux", target_os="openbsd"))'.dependencies]
ashpd = { version = "0.3.0", optional = true }
# TODO(x11/dependencies): only use feature "xcb" if using X11
cairo-rs = { version = "0.14.0", default_features = false, features = ["xcb"] }
cairo-rs = { version = "0.14.0", default_features = false, features = ["xcb"], optional = true }
cairo-sys-rs = { version = "0.14.0", default_features = false, optional = true }
futures = { version = "0.3.21", optional = true, features = ["executor"]}
gdk-sys = { version = "0.14.0", optional = true }
Expand All @@ -127,11 +124,11 @@ version = "0.3.44"
features = ["Window", "MouseEvent", "CssStyleDeclaration", "WheelEvent", "KeyEvent", "KeyboardEvent", "Navigator"]

[dev-dependencies]
piet-common = { version = "=0.5.0", features = ["png"] }
static_assertions = "1.1.0"
test-log = { version = "0.2.5", features = ["trace"], default-features = false }
tracing-subscriber = { version = "0.3.2", features = ["env-filter"] }
unicode-segmentation = "1.7.0"
piet-gpu-hal = { git = "https://github.com/linebender/piet-gpu", rev = "947a85f" }

[build-dependencies]
bindgen = { version = "0.61", optional = true }
Expand Down
Loading

0 comments on commit ffc26a9

Please sign in to comment.