From 28423f54db3d18021d1da8a16ef2fe96bc9d6478 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 20 Nov 2019 06:19:20 +0100 Subject: Remove `dbg!` in `UserInterface` --- native/src/user_interface.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'native') diff --git a/native/src/user_interface.rs b/native/src/user_interface.rs index f031b090..9324fe0b 100644 --- a/native/src/user_interface.rs +++ b/native/src/user_interface.rs @@ -109,11 +109,7 @@ where let layout = if hash == cache.hash { cache.layout } else { - let layout_start = std::time::Instant::now(); - let layout = renderer.layout(&root); - dbg!(std::time::Instant::now() - layout_start); - - layout + renderer.layout(&root) }; UserInterface { -- cgit From cb4827059fdb34fa9b0cea714fb81b28741a08e7 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 20 Nov 2019 09:41:04 +0100 Subject: Add `README` for each subcrate --- native/README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 native/README.md (limited to 'native') diff --git a/native/README.md b/native/README.md new file mode 100644 index 00000000..60f350b8 --- /dev/null +++ b/native/README.md @@ -0,0 +1,23 @@ +# `iced_native` +[![Documentation](https://docs.rs/iced_native/badge.svg)][documentation] +[![Crates.io](https://img.shields.io/crates/v/iced_native.svg)](https://crates.io/crates/iced_native) +[![License](https://img.shields.io/crates/l/iced_native.svg)](https://github.com/hecrj/iced/blob/master/LICENSE) +[![project chat](https://img.shields.io/badge/chat-on_zulip-brightgreen.svg)](https://iced.zulipchat.com) + +`iced_native` takes [`iced_core`] and builds a native runtime on top of it, featuring: +- A custom layout engine, greatly inspired by [`druid`] +- Event handling for all the built-in widgets +- A renderer-agnostic API + +To achieve this, it introduces a bunch of reusable interfaces: +- A `Widget` trait, which is used to implement new widgets: from layout requirements to event and drawing logic. +- A bunch of `Renderer` traits, meant to keep the crate renderer-agnostic. +- A `Windowed` trait, leveraging [`raw-window-handle`], which can be implemented by graphical renderers that target _windows_. Window-based shells (like [`iced_winit`]) can use this trait to stay renderer-agnostic. + +![iced_native](../docs/graphs/native.png) + +[documentation]: https://docs.rs/iced_native +[`iced_core`]: ../core +[`iced_winit`]: ../winit +[`druid`]: https://github.com/xi-editor/druid +[`raw-window-handle`]: https://github.com/rust-windowing/raw-window-handle -- cgit From 4b94cf00351f09fa916ebb1d89e4cdf4622fd800 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 20 Nov 2019 09:56:16 +0100 Subject: Add installation section to subcrate `README`s --- native/Cargo.toml | 4 ++-- native/README.md | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'native') diff --git a/native/Cargo.toml b/native/Cargo.toml index 5dc3ae1a..7993676e 100644 --- a/native/Cargo.toml +++ b/native/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "iced_native" -version = "0.1.0-alpha" +version = "0.1.0" authors = ["Héctor Ramón Jiménez "] edition = "2018" description = "A renderer-agnostic library for native GUIs" @@ -8,6 +8,6 @@ license = "MIT" repository = "https://github.com/hecrj/iced" [dependencies] -iced_core = { version = "0.1.0-alpha", path = "../core", features = ["command"] } +iced_core = { version = "0.1.0", path = "../core", features = ["command"] } twox-hash = "1.5" raw-window-handle = "0.3" diff --git a/native/README.md b/native/README.md index 60f350b8..59ec5424 100644 --- a/native/README.md +++ b/native/README.md @@ -21,3 +21,15 @@ To achieve this, it introduces a bunch of reusable interfaces: [`iced_winit`]: ../winit [`druid`]: https://github.com/xi-editor/druid [`raw-window-handle`]: https://github.com/rust-windowing/raw-window-handle + +## Installation +Add `iced_native` as a dependency in your `Cargo.toml`: + +```toml +iced_native = "0.1.0" +``` + +__Iced moves fast and the `master` branch can contain breaking changes!__ If +you want to learn about a specific release, check out [the release list]. + +[the release list]: https://github.com/hecrj/iced/releases -- cgit