From 90690702e1e4abab804ec91e8ff4183824bec436 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 20 Jan 2020 04:47:36 +0100 Subject: Add `Application::Executor` associated type --- src/lib.rs | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 759dea2f..18dfc098 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -180,18 +180,26 @@ #![deny(unsafe_code)] #![deny(rust_2018_idioms)] mod application; -#[cfg(target_arch = "wasm32")] -#[path = "web.rs"] -mod platform; -#[cfg(not(target_arch = "wasm32"))] -#[path = "native.rs"] -mod platform; mod sandbox; +#[cfg(not(target_arch = "wasm32"))] +mod native; + +#[cfg(not(target_arch = "wasm32"))] +pub use native::*; + +#[cfg(target_arch = "wasm32")] +mod web; + +#[cfg(target_arch = "wasm32")] +pub use web::*; + pub mod settings; pub mod window; +#[doc(no_inline)] +pub use executor::Executor; + pub use application::Application; -pub use platform::*; pub use sandbox::Sandbox; pub use settings::Settings; -- cgit From 04086a90c9e933ebfb42de378054e1115b33529d Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 20 Jan 2020 05:43:09 +0100 Subject: Implement `WasmBindgen` executor and reorganize --- src/lib.rs | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 18dfc098..9c9bcff5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -180,26 +180,30 @@ #![deny(unsafe_code)] #![deny(rust_2018_idioms)] mod application; +mod element; mod sandbox; -#[cfg(not(target_arch = "wasm32"))] -mod native; - -#[cfg(not(target_arch = "wasm32"))] -pub use native::*; - -#[cfg(target_arch = "wasm32")] -mod web; - -#[cfg(target_arch = "wasm32")] -pub use web::*; - +pub mod executor; pub mod settings; +pub mod widget; pub mod window; #[doc(no_inline)] -pub use executor::Executor; +pub use widget::*; pub use application::Application; +pub use element::Element; +pub use executor::Executor; pub use sandbox::Sandbox; pub use settings::Settings; + +#[cfg(not(target_arch = "wasm32"))] +use iced_winit as common; + +#[cfg(target_arch = "wasm32")] +use iced_web as common; + +pub use common::{ + Align, Background, Color, Command, Font, HorizontalAlignment, Length, + Space, Subscription, Vector, VerticalAlignment, +}; -- cgit From 7cea7371150e6de28032827519936008592f112d Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 20 Jan 2020 06:27:01 +0100 Subject: Package examples and remove `dev-dependencies` --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 9c9bcff5..1da3f549 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -204,6 +204,6 @@ use iced_winit as common; use iced_web as common; pub use common::{ - Align, Background, Color, Command, Font, HorizontalAlignment, Length, - Space, Subscription, Vector, VerticalAlignment, + futures, Align, Background, Color, Command, Font, HorizontalAlignment, + Length, Space, Subscription, Vector, VerticalAlignment, }; -- cgit