Skip to content

Commit

Permalink
chore: error if neither winit or wayland feature is set
Browse files Browse the repository at this point in the history
  • Loading branch information
mmstick committed Sep 1, 2023
1 parent ab80fe8 commit 8b2389f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ keywords = ["gui", "ui", "graphics", "interface", "widgets"]
categories = ["gui"]

[features]
default = ["winit", "a11y"]
# Enable the `wgpu` GPU-accelerated renderer backend
wgpu = ["iced_renderer/wgpu"]
# Enables the `Image` widget
Expand Down
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(docsrs, feature(doc_cfg))]

#[cfg(all(not(feature = "wayland"), not(feature = "winit")))]
compile_error!("must define `wayland` or `winit` feature");

#[cfg(all(feature = "wayland", feature = "winit"))]
compile_error!("cannot use `wayland` feature with `winit");

pub use iced_futures::futures;
use iced_widget::graphics;
use iced_widget::renderer;
Expand Down

0 comments on commit 8b2389f

Please sign in to comment.