diff options
author | 2020-05-27 05:05:13 +0200 | |
---|---|---|
committer | 2020-05-27 05:05:13 +0200 | |
commit | 22ced3485eb6f295faaab1e31d8d1b8d61fc422b (patch) | |
tree | 5dde16d8a4a161995800acc482c13fc8dc697639 /src/lib.rs | |
parent | d6bf8955dbca03898e379aae376d91677bb4d223 (diff) | |
download | iced-22ced3485eb6f295faaab1e31d8d1b8d61fc422b.tar.gz iced-22ced3485eb6f295faaab1e31d8d1b8d61fc422b.tar.bz2 iced-22ced3485eb6f295faaab1e31d8d1b8d61fc422b.zip |
Introduce feature flags to enable `iced_glow`
Also keep `iced_wgpu` as the default renderer for the time being.
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 29 |
1 files changed, 23 insertions, 6 deletions
@@ -197,6 +197,29 @@ pub mod window; #[cfg_attr(docsrs, doc(cfg(any(feature = "tokio", feature = "async-std"))))] pub mod time; +#[cfg(all( + not(target_arch = "wasm32"), + not(feature = "glow"), + feature = "wgpu" +))] +use iced_winit as runtime; + +#[cfg(all(not(target_arch = "wasm32"), feature = "glow"))] +use iced_glutin as runtime; + +#[cfg(all( + not(target_arch = "wasm32"), + not(feature = "glow"), + feature = "wgpu" +))] +use iced_wgpu as renderer; + +#[cfg(all(not(target_arch = "wasm32"), feature = "glow"))] +use iced_glow as renderer; + +#[cfg(target_arch = "wasm32")] +use iced_web as runtime; + #[doc(no_inline)] pub use widget::*; @@ -206,12 +229,6 @@ pub use executor::Executor; pub use sandbox::Sandbox; pub use settings::Settings; -#[cfg(not(target_arch = "wasm32"))] -use iced_glutin as runtime; - -#[cfg(target_arch = "wasm32")] -use iced_web as runtime; - pub use runtime::{ futures, Align, Background, Color, Command, Font, HorizontalAlignment, Length, Point, Rectangle, Size, Subscription, Vector, VerticalAlignment, |