diff --git a/ECOSYSTEM.md b/ECOSYSTEM.md index 65815b96..82303130 100644 --- a/ECOSYSTEM.md +++ b/ECOSYSTEM.md @@ -1,10 +1,7 @@ # Ecosystem -This document describes the Iced ecosystem. - -It quickly lists the different audiences of the library and explains how the different crates relate to each other. - -## Users +This document describes the Iced ecosystem and explains how the different crates relate to each other. +## Overview Iced is meant to be used by 2 different types of users: - __End-users__. They should be able to: @@ -18,71 +15,81 @@ Iced is meant to be used by 2 different types of users: - integrate existing runtimes in their own system (like game engines), - and create their own custom renderers. -## Crates Iced consists of different crates which offer different layers of abstractions for our users. This modular architecture helps us keep implementation details hidden and decoupled, which should allow us to rewrite or change strategies in the future. -![Ecosystem graph](docs/graphs/ecosystem.png) +

+ The Iced Ecosystem +

-### [`iced_core`] -[`iced_core`] holds basic reusable types of the public API. For instance, basic data types like `Point`, `Rectangle`, `Length`, etc. +## The foundations +There are a bunch of concepts that permeate the whole ecosystem. These concepts are considered __the foundations__, and they are provided by three different crates: -This crate is meant to be a starting point for an Iced runtime. +- [`iced_core`] contains many lightweight, reusable primitives (e.g. `Point`, `Rectangle`, `Color`). +- [`iced_futures`] implements the concurrent concepts of [The Elm Architecture] on top of the [`futures`] ecosystem. +- [`iced_style`] defines the default styling capabilities of built-in widgets. -### [`iced_native`] -[`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 +

+ The foundations +

-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 `Backend` 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. +## The native target +The native side of the ecosystem is split into two different groups: __renderers__ and __shells__. -[`druid`]: https://github.com/xi-editor/druid -[`raw-window-handle`]: https://github.com/rust-windowing/raw-window-handle +

+ The native target +

-### [`iced_web`] -[`iced_web`] takes [`iced_core`] and builds a WebAssembly runtime on top. It achieves this by introducing a `Widget` trait that can be used to produce VDOM nodes. +### Renderers +The widgets of a _graphical_ user interface produce some primitives that eventually need to be drawn on screen. __Renderers__ take care of this task, potentially leveraging GPU acceleration. -The crate is currently a simple abstraction layer over [`dodrio`]. +Currently, there are two different official renderers: -[`dodrio`]: https://github.com/fitzgen/dodrio +- [`iced_wgpu`] is powered by [`wgpu`] and supports Vulkan, DirectX 12, and Metal. +- [`iced_glow`] is powered by [`glow`] and supports OpenGL 3.3+. -### [`iced_wgpu`] -[`iced_wgpu`] is a [`wgpu`] renderer for [`iced_native`]. For now, it is the default renderer of Iced in native platforms. +Additionally, the [`iced_graphics`] subcrate contains a bunch of backend-agnostic types that can be leveraged to build renderers. Both of the renderers rely on the graphical foundations provided by this crate. -[`wgpu`] supports most modern graphics backends: Vulkan, Metal, DX11, and DX12 (OpenGL and WebGL are still WIP). Additionally, it will support the incoming [WebGPU API]. +### Shells +The widgets of a graphical user _interface_ are interactive. __Shells__ gather and process user interactions in an event loop. -Currently, [`iced_wgpu`] supports the following primitives: -- Text, which is rendered using [`wgpu_glyph`]. No shaping at all. -- Quads or rectangles, with rounded borders and a solid background color. -- Clip areas, useful to implement scrollables or hide overflowing content. -- Images and SVG, loaded from memory or the file system. -- Meshes of triangles, useful to draw geometry freely. +Normally, a shell will be responsible of creating a window and managing the lifecycle of a user interface, implementing a runtime of [The Elm Architecture]. -[`wgpu`]: https://github.com/gfx-rs/wgpu-rs -[WebGPU API]: https://gpuweb.github.io/gpuweb/ -[`wgpu_glyph`]: https://github.com/hecrj/wgpu_glyph +As of now, there are two official shells: -### [`iced_winit`] -[`iced_winit`] offers some convenient abstractions on top of [`iced_native`] to quickstart development when using [`winit`]. +- [`iced_winit`] implements a shell runtime on top of [`winit`]. +- [`iced_glutin`] is similar to [`iced_winit`], but it also deals with [OpenGL context creation]. -It exposes a renderer-agnostic `Application` trait that can be implemented and then run with a simple call. The use of this trait is optional. A `conversion` module is provided for users that decide to implement a custom event loop. +## The web target +The Web platform provides all the abstractions necessary to draw widgets and gather users interactions. -[`winit`]: https://github.com/rust-windowing/winit +Therefore, unlike the native path, the web side of the ecosystem does not need to split renderers and shells. Instead, [`iced_web`] leverages [`dodrio`] to both render widgets and implement a proper runtime. -### [`iced`] +## Iced Finally, [`iced`] unifies everything into a simple abstraction to create cross-platform applications: -- On native, it uses [`iced_winit`] and [`iced_wgpu`]. +- On native, it uses __[shells](#shells)__ and __[renderers](#renderers)__. - On the web, it uses [`iced_web`]. -This is the crate meant to be used by __end-users__. +

+ Iced +

[`iced_core`]: core +[`iced_futures`]: futures +[`iced_style`]: style [`iced_native`]: native [`iced_web`]: web +[`iced_graphics`]: graphics [`iced_wgpu`]: wgpu +[`iced_glow`]: glow [`iced_winit`]: winit +[`iced_glutin`]: glutin [`iced`]: .. +[`futures`]: https://github.com/rust-lang/futures-rs +[`glow`]: https://github.com/grovesNL/glow +[`wgpu`]: https://github.com/gfx-rs/wgpu-rs +[`winit`]: https://github.com/rust-windowing/winit +[`glutin`]: https://github.com/rust-windowing/glutin +[`dodrio`]: https://github.com/fitzgen/dodrio +[OpenGL context creation]: https://www.khronos.org/opengl/wiki/Creating_an_OpenGL_Context +[The Elm Architecture]: https://guide.elm-lang.org/architecture/ diff --git a/README.md b/README.md index 9dbd3ed4..5bc885d2 100644 --- a/README.md +++ b/README.md @@ -174,20 +174,13 @@ The core of the library was implemented during May in [this pull request]. implemented the current [tour example] on top of [`ggez`], a game library. Since then, the focus has shifted towards providing a batteries-included, -end-user-oriented GUI library, while keeping [the ecosystem] modular. +end-user-oriented GUI library, while keeping [the ecosystem] modular: -Currently, Iced is a cross-platform GUI library built on top of smaller crates: - - - [`iced_core`], a bunch of basic types that can be reused in different runtimes. - - [`iced_native`], a renderer-agnostic native runtime implementing widget - logic and a layout engine inspired by [`druid`]. - - [`iced_web`], an experimental web runtime that targets the DOM thanks to - [`dodrio`]. - - [`iced_wgpu`], a renderer leveraging [`wgpu`], [`wgpu_glyph`], and - [`font-kit`]. - - [`iced_winit`], a windowing shell on top of [`winit`]. - -[![Iced ecosystem](docs/graphs/ecosystem.png)](https://github.com/hecrj/iced/blob/master/ECOSYSTEM.md) +

+ + Iced Ecosystem + +

[this pull request]: https://github.com/hecrj/coffee/pull/35 [The first alpha version]: https://github.com/hecrj/iced/tree/0.1.0-alpha @@ -195,15 +188,6 @@ Currently, Iced is a cross-platform GUI library built on top of smaller crates: [tour example]: https://github.com/hecrj/iced/blob/master/examples/README.md#tour [`ggez`]: https://github.com/ggez/ggez [the ecosystem]: https://github.com/hecrj/iced/blob/master/ECOSYSTEM.md -[`iced_core`]: https://github.com/hecrj/iced/tree/master/core -[`iced_native`]: https://github.com/hecrj/iced/tree/master/native -[`iced_web`]: https://github.com/hecrj/iced/tree/master/web -[`iced_wgpu`]: https://github.com/hecrj/iced/tree/master/wgpu -[`iced_winit`]: https://github.com/hecrj/iced/tree/master/winit -[`druid`]: https://github.com/xi-editor/druid -[`wgpu_glyph`]: https://github.com/hecrj/wgpu_glyph -[`font-kit`]: https://github.com/servo/font-kit -[`winit`]: https://github.com/rust-windowing/winit ## Contributing / Feedback Contributions are greatly appreciated! If you want to contribute, please diff --git a/ROADMAP.md b/ROADMAP.md index c47c08ff..05aa9bda 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -6,7 +6,7 @@ Before diving into the roadmap, check out [the ecosystem overview] to get an ide [the ecosystem overview]: ECOSYSTEM.md ## Next steps -Most of the work related to these features needs to happen in the `iced_native` path of the ecosystem, as the web already supports many of them. +Most of the work related to these features needs to happen in the __native__ path of the ecosystem, as the web already supports many of them. Once a step is completed, it is collapsed and added to this list: @@ -17,6 +17,8 @@ Once a step is completed, it is collapsed and added to this list: * [x] Custom layout engine ([#52]) * [x] Event subscriptions ([#122]) * [x] Custom styling ([#146]) + * [x] Canvas for 2D graphics ([#193]) + * [x] Basic overlay support ([#444]) [#24]: https://github.com/hecrj/iced/issues/24 [#25]: https://github.com/hecrj/iced/issues/25 @@ -25,6 +27,8 @@ Once a step is completed, it is collapsed and added to this list: [#52]: https://github.com/hecrj/iced/pull/52 [#122]: https://github.com/hecrj/iced/pull/122 [#146]: https://github.com/hecrj/iced/pull/146 +[#193]: https://github.com/hecrj/iced/pull/193 +[#444]: https://github.com/hecrj/iced/pull/444 ### Multi-window support ([#27]) Open and control multiple windows at runtime. @@ -35,17 +39,6 @@ This approach should also allow us to perform custom optimizations for this part [#27]: https://github.com/hecrj/iced/issues/27 -### Layers ([#30]) -Currently, Iced assumes widgets cannot be laid out on top of each other. We should implement support for multiple layers of widgets. - -This is a necessary feature to implement many kinds of interactables, like dropdown menus, select fields, etc. - -`iced_native` will need to group widgets to perform layouting and process some events first for widgets positioned on top. - -`iced_wgpu` will also need to process the scene graph and sort draw calls based on the different layers. - -[#30]: https://github.com/hecrj/iced/issues/30 - ### Animations ([#31]) Allow widgets to request a redraw at a specific time. @@ -55,8 +48,8 @@ This is a necessary feature to render loading spinners, a blinking text cursor, [#31]: https://github.com/hecrj/iced/issues/31 -### Canvas widget ([#32]) -A widget to draw freely in 2D or 3D. It could be used to draw charts, implement a Paint clone, a CAD application, etc. +### Canvas widget for 3D graphics ([#32]) +A widget to draw freely in 3D. It could be used to draw charts, implement a Paint clone, a CAD application, etc. As a first approach, we could expose the underlying renderer directly here, and couple this widget with it ([`wgpu`] for now). Once [`wgpu`] gets WebGL or WebGPU support, this widget will be able to run on the web too. The renderer primitive could be a simple texture that the widget draws to. diff --git a/core/README.md b/core/README.md index 641612c0..9ec0df6a 100644 --- a/core/README.md +++ b/core/README.md @@ -8,7 +8,9 @@ This crate is meant to be a starting point for an Iced runtime. -![iced_core](../docs/graphs/core.png) +

+ The foundations +

[documentation]: https://docs.rs/iced_core diff --git a/core/src/lib.rs b/core/src/lib.rs index 6b9e612e..f2d21a5f 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -1,11 +1,11 @@ //! The core library of [Iced]. //! -//! ![`iced_core` crate graph](https://github.com/hecrj/iced/blob/cae26cb7bc627f4a5b3bcf1cd023a0c552e8c65e/docs/graphs/core.png?raw=true) -//! //! This library holds basic types that can be reused and re-exported in //! different runtime implementations. For instance, both [`iced_native`] and //! [`iced_web`] are built on top of `iced_core`. //! +//! ![The foundations of the Iced ecosystem](https://github.com/hecrj/iced/blob/0525d76ff94e828b7b21634fa94a747022001c83/docs/graphs/foundations.png?raw=true) +//! //! [Iced]: https://github.com/hecrj/iced //! [`iced_native`]: https://github.com/hecrj/iced/tree/master/native //! [`iced_web`]: https://github.com/hecrj/iced/tree/master/web diff --git a/docs/graphs/core.dot b/docs/graphs/core.dot deleted file mode 100644 index 93724927..00000000 --- a/docs/graphs/core.dot +++ /dev/null @@ -1,13 +0,0 @@ -digraph G { - fontname = "Roboto"; - newrank=true; - node[fontname = "Roboto", style="filled", fontcolor="#333333", fillcolor=white, color="#333333"]; - edge[color="#333333"]; - - { rank = same; iced_native iced_web } - - iced_core -> iced_native [style=dashed]; - iced_core -> iced_web [style=dashed]; - - iced_core [style=dashed]; -} diff --git a/docs/graphs/core.png b/docs/graphs/core.png deleted file mode 100644 index 0b14ab6c..00000000 Binary files a/docs/graphs/core.png and /dev/null differ diff --git a/docs/graphs/ecosystem.dot b/docs/graphs/ecosystem.dot deleted file mode 100644 index 609cf726..00000000 --- a/docs/graphs/ecosystem.dot +++ /dev/null @@ -1,56 +0,0 @@ -digraph G { - fontname = "Roboto"; - newrank=true; - node[fontname = "Roboto", style="filled", fontcolor="#333333", fillcolor=white, color="#333333"]; - edge[color="#333333"]; - - subgraph cluster_1 { - label = "renderers "; - labelloc = "b"; - labeljust = "r"; - fontcolor = "#0366d6"; - color="#f6f8fa"; - bgcolor="#f6f8fa"; - style=rounded; - - etc_1 [label="...", style=solid, shape=none]; - iced_wgpu; - } - - subgraph cluster_2 { - label = "shells "; - labelloc = "b"; - labeljust = "r"; - fontcolor = "#0366d6"; - color="#f6f8fa"; - bgcolor="#f6f8fa"; - style=rounded; - - etc_2 [label="...", style=solid, shape=none]; - iced_winit; - } - - subgraph cluster_3 { - style=invis; - margin=20; - iced; - } - - { rank = same; iced_native iced_web } - { rank = same; iced_wgpu iced_winit etc_1 etc_2 } - - iced_core -> iced_native [style=dashed]; - iced_core -> iced_web [style=dashed]; - iced_native -> iced_wgpu; - iced_native -> iced_winit; - - iced_winit -> iced; - iced_wgpu -> iced; - iced_web -> iced; - - iced -> "cross-platform application"; - - iced_core [style=dashed]; - - "cross-platform application" [shape=box, width=2.8, height=0.6]; -} diff --git a/docs/graphs/ecosystem.png b/docs/graphs/ecosystem.png index 03fe1130..8b418c52 100644 Binary files a/docs/graphs/ecosystem.png and b/docs/graphs/ecosystem.png differ diff --git a/docs/graphs/foundations.png b/docs/graphs/foundations.png new file mode 100644 index 00000000..cc043c99 Binary files /dev/null and b/docs/graphs/foundations.png differ diff --git a/docs/graphs/generate.sh b/docs/graphs/generate.sh deleted file mode 100755 index 45073820..00000000 --- a/docs/graphs/generate.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -for file in *.dot -do - dot -Tpng ${file} -o ${file%.*}.png -done diff --git a/docs/graphs/iced.dot b/docs/graphs/iced.dot deleted file mode 100644 index 24dbb972..00000000 --- a/docs/graphs/iced.dot +++ /dev/null @@ -1,46 +0,0 @@ -digraph G { - fontname = "Roboto"; - newrank=true; - node[fontname = "Roboto", style="filled", fontcolor="#333333", fillcolor=white, color="#333333"]; - edge[color="#333333"]; - - subgraph cluster_1 { - label = "renderers "; - labelloc = "b"; - labeljust = "r"; - fontcolor = "#0366d6"; - color="#f6f8fa"; - bgcolor="#f6f8fa"; - style=rounded; - - etc_1 [label="...", style=solid, shape=none]; - iced_wgpu; - } - - subgraph cluster_2 { - label = "shells "; - labelloc = "b"; - labeljust = "r"; - fontcolor = "#0366d6"; - color="#f6f8fa"; - bgcolor="#f6f8fa"; - style=rounded; - - etc_2 [label="...", style=solid, shape=none]; - iced_winit; - } - - subgraph cluster_3 { - style=invis; - margin=20; - iced; - } - - { rank = same; iced_wgpu iced_winit etc_1 etc_2 } - - iced_winit -> iced; - iced_wgpu -> iced; - iced_web -> iced; - - iced; -} diff --git a/docs/graphs/iced.png b/docs/graphs/iced.png index 5d4a35bc..bf777e53 100644 Binary files a/docs/graphs/iced.png and b/docs/graphs/iced.png differ diff --git a/docs/graphs/native.dot b/docs/graphs/native.dot deleted file mode 100644 index b57736b5..00000000 --- a/docs/graphs/native.dot +++ /dev/null @@ -1,41 +0,0 @@ -digraph G { - fontname = "Roboto"; - newrank=true; - node[fontname = "Roboto", style="filled", fontcolor="#333333", fillcolor=white, color="#333333"]; - edge[color="#333333"]; - - subgraph cluster_1 { - label = "renderers "; - labelloc = "b"; - labeljust = "r"; - fontcolor = "#0366d6"; - color="#f6f8fa"; - bgcolor="#f6f8fa"; - style=rounded; - - etc_1 [label="...", style=solid, shape=none]; - iced_wgpu; - } - - subgraph cluster_2 { - label = "shells "; - labelloc = "b"; - labeljust = "r"; - fontcolor = "#0366d6"; - color="#f6f8fa"; - bgcolor="#f6f8fa"; - style=rounded; - - etc_2 [label="...", style=solid, shape=none]; - iced_winit; - } - - - { rank = same; iced_wgpu iced_winit etc_1 etc_2 } - - iced_core -> iced_native [style=dashed]; - iced_native -> iced_wgpu; - iced_native -> iced_winit; - - iced_core [style=dashed]; -} diff --git a/docs/graphs/native.png b/docs/graphs/native.png index 892e4fee..6a8759e0 100644 Binary files a/docs/graphs/native.png and b/docs/graphs/native.png differ diff --git a/docs/graphs/web.dot b/docs/graphs/web.dot deleted file mode 100644 index 853ca398..00000000 --- a/docs/graphs/web.dot +++ /dev/null @@ -1,12 +0,0 @@ -digraph G { - fontname = "Roboto"; - newrank=true; - node[fontname = "Roboto", style="filled", fontcolor="#333333", fillcolor=white, color="#333333"]; - edge[color="#333333"]; - - iced_core -> iced_web [style=dashed]; - - iced_web -> iced; - - iced_core [style=dashed]; -} diff --git a/docs/graphs/web.png b/docs/graphs/web.png deleted file mode 100644 index e6a1a5f6..00000000 Binary files a/docs/graphs/web.png and /dev/null differ diff --git a/docs/graphs/wgpu.dot b/docs/graphs/wgpu.dot deleted file mode 100644 index 410c2eeb..00000000 --- a/docs/graphs/wgpu.dot +++ /dev/null @@ -1,31 +0,0 @@ -digraph G { - fontname = "Roboto"; - newrank=true; - node[fontname = "Roboto", style="filled", fontcolor="#333333", fillcolor=white, color="#333333"]; - edge[color="#333333"]; - - subgraph cluster_1 { - label = "renderers "; - labelloc = "b"; - labeljust = "r"; - fontcolor = "#0366d6"; - color="#f6f8fa"; - bgcolor="#f6f8fa"; - style=rounded; - - etc_1 [label="...", style=solid, shape=none]; - iced_wgpu; - } - - subgraph cluster_3 { - style=invis; - margin=20; - iced; - } - - { rank = same; iced_wgpu etc_1 } - - iced_native -> iced_wgpu; - - iced_wgpu -> iced; -} diff --git a/docs/graphs/wgpu.png b/docs/graphs/wgpu.png deleted file mode 100644 index 4831caba..00000000 Binary files a/docs/graphs/wgpu.png and /dev/null differ diff --git a/docs/graphs/winit.dot b/docs/graphs/winit.dot deleted file mode 100644 index 4ea5149a..00000000 --- a/docs/graphs/winit.dot +++ /dev/null @@ -1,31 +0,0 @@ -digraph G { - fontname = "Roboto"; - newrank=true; - node[fontname = "Roboto", style="filled", fontcolor="#333333", fillcolor=white, color="#333333"]; - edge[color="#333333"]; - - subgraph cluster_2 { - label = "shells "; - labelloc = "b"; - labeljust = "r"; - fontcolor = "#0366d6"; - color="#f6f8fa"; - bgcolor="#f6f8fa"; - style=rounded; - - etc_2 [label="...", style=solid, shape=none]; - iced_winit; - } - - subgraph cluster_3 { - style=invis; - margin=20; - iced; - } - - { rank = same; iced_winit etc_2 } - - iced_native -> iced_winit; - - iced_winit -> iced; -} diff --git a/docs/graphs/winit.png b/docs/graphs/winit.png deleted file mode 100644 index 1c028b29..00000000 Binary files a/docs/graphs/winit.png and /dev/null differ diff --git a/futures/src/lib.rs b/futures/src/lib.rs index f46db449..c7c6fd3a 100644 --- a/futures/src/lib.rs +++ b/futures/src/lib.rs @@ -1,4 +1,6 @@ //! Asynchronous tasks for GUI programming, inspired by Elm. +//! +//! ![The foundations of the Iced ecosystem](https://github.com/hecrj/iced/blob/0525d76ff94e828b7b21634fa94a747022001c83/docs/graphs/foundations.png?raw=true) #![deny(missing_docs)] #![deny(missing_debug_implementations)] #![deny(unused_results)] diff --git a/glow/src/lib.rs b/glow/src/lib.rs index 5011da8e..98faf24c 100644 --- a/glow/src/lib.rs +++ b/glow/src/lib.rs @@ -1,5 +1,7 @@ //! A [`glow`] renderer for [`iced_native`]. //! +//! ![The native path of the Iced ecosystem](https://github.com/hecrj/iced/blob/0525d76ff94e828b7b21634fa94a747022001c83/docs/graphs/native.png?raw=true) +//! //! [`glow`]: https://github.com/grovesNL/glow //! [`iced_native`]: https://github.com/hecrj/iced/tree/master/native #![deny(missing_docs)] diff --git a/glutin/README.md b/glutin/README.md index 34dec1b3..addb9228 100644 --- a/glutin/README.md +++ b/glutin/README.md @@ -1,24 +1,26 @@ -# `iced_winit` -[![Documentation](https://docs.rs/iced_winit/badge.svg)][documentation] -[![Crates.io](https://img.shields.io/crates/v/iced_winit.svg)](https://crates.io/crates/iced_winit) -[![License](https://img.shields.io/crates/l/iced_winit.svg)](https://github.com/hecrj/iced/blob/master/LICENSE) +# `iced_glutin` +[![Documentation](https://docs.rs/iced_glutin/badge.svg)][documentation] +[![Crates.io](https://img.shields.io/crates/v/iced_glutin.svg)](https://crates.io/crates/iced_glutin) +[![License](https://img.shields.io/crates/l/iced_glutin.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_winit` offers some convenient abstractions on top of [`iced_native`] to quickstart development when using [`winit`]. +`iced_glutin` offers some convenient abstractions on top of [`iced_native`] to quickstart development when using [`glutin`]. It exposes a renderer-agnostic `Application` trait that can be implemented and then run with a simple call. The use of this trait is optional. A `conversion` module is provided for users that decide to implement a custom event loop. -![iced_winit](../docs/graphs/winit.png) +

+ The native target +

-[documentation]: https://docs.rs/iced_winit +[documentation]: https://docs.rs/iced_glutin [`iced_native`]: ../native -[`winit`]: https://github.com/rust-windowing/winit +[`glutin`]: https://github.com/rust-windowing/glutin ## Installation -Add `iced_winit` as a dependency in your `Cargo.toml`: +Add `iced_glutin` as a dependency in your `Cargo.toml`: ```toml -iced_winit = "0.1" +iced_glutin = "0.1" ``` __Iced moves fast and the `master` branch can contain breaking changes!__ If diff --git a/glutin/src/lib.rs b/glutin/src/lib.rs index 49bc2a33..f2c0102a 100644 --- a/glutin/src/lib.rs +++ b/glutin/src/lib.rs @@ -1,5 +1,7 @@ //! A windowing shell for [`iced`], on top of [`glutin`]. //! +//! ![The native path of the Iced ecosystem](https://github.com/hecrj/iced/blob/0525d76ff94e828b7b21634fa94a747022001c83/docs/graphs/native.png?raw=true) +//! //! [`iced`]: https://github.com/hecrj/iced //! [`glutin`]: https://github.com/rust-windowing/glutin #![deny(missing_docs)] diff --git a/graphics/Cargo.toml b/graphics/Cargo.toml index ca93a83a..3158e860 100644 --- a/graphics/Cargo.toml +++ b/graphics/Cargo.toml @@ -3,7 +3,12 @@ name = "iced_graphics" version = "0.1.0" authors = ["Héctor Ramón Jiménez "] edition = "2018" +description = "A bunch of backend-agnostic types that can be leveraged to build a renderer for Iced" license = "MIT" +repository = "https://github.com/hecrj/iced" +documentation = "https://docs.rs/iced_graphics" +keywords = ["gui", "ui", "graphics", "interface", "widgets"] +categories = ["gui"] [features] canvas = ["lyon"] diff --git a/graphics/src/lib.rs b/graphics/src/lib.rs index a3bd5364..14388653 100644 --- a/graphics/src/lib.rs +++ b/graphics/src/lib.rs @@ -1,6 +1,8 @@ //! A bunch of backend-agnostic types that can be leveraged to build a renderer //! for [`iced`]. //! +//! ![The native path of the Iced ecosystem](https://github.com/hecrj/iced/blob/0525d76ff94e828b7b21634fa94a747022001c83/docs/graphs/native.png?raw=true) +//! //! [`iced`]: https://github.com/hecrj/iced #![deny(missing_docs)] #![deny(missing_debug_implementations)] diff --git a/native/README.md b/native/README.md index 31c7db88..849deb58 100644 --- a/native/README.md +++ b/native/README.md @@ -14,7 +14,9 @@ To achieve this, it introduces a bunch of reusable interfaces: - 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) +

+ The native target +

[documentation]: https://docs.rs/iced_native [`iced_core`]: ../core diff --git a/native/src/lib.rs b/native/src/lib.rs index ff355aa7..f9a99c48 100644 --- a/native/src/lib.rs +++ b/native/src/lib.rs @@ -1,6 +1,6 @@ //! A renderer-agnostic native GUI runtime. //! -//! ![`iced_native` crate graph](https://github.com/hecrj/iced/blob/cae26cb7bc627f4a5b3bcf1cd023a0c552e8c65e/docs/graphs/native.png?raw=true) +//! ![The native path of the Iced ecosystem](https://github.com/hecrj/iced/raw/improvement/update-ecosystem-and-roadmap/docs/graphs/native.png) //! //! `iced_native` takes [`iced_core`] and builds a native runtime on top of it, //! featuring: diff --git a/style/src/lib.rs b/style/src/lib.rs index 3d23d990..7e0a9f49 100644 --- a/style/src/lib.rs +++ b/style/src/lib.rs @@ -2,6 +2,8 @@ //! //! It contains a set of styles and stylesheets for most of the built-in //! widgets. +//! +//! ![The foundations of the Iced ecosystem](https://github.com/hecrj/iced/blob/0525d76ff94e828b7b21634fa94a747022001c83/docs/graphs/foundations.png?raw=true) pub use iced_core::{Background, Color}; pub mod button; diff --git a/web/README.md b/web/README.md index 810bd1ec..d6dd7950 100644 --- a/web/README.md +++ b/web/README.md @@ -8,8 +8,6 @@ The crate is currently a __very experimental__, simple abstraction layer over [`dodrio`]. -![iced_core](../docs/graphs/web.png) - [documentation]: https://docs.rs/iced_web [`iced_core`]: ../core [`dodrio`]: https://github.com/fitzgen/dodrio diff --git a/web/src/lib.rs b/web/src/lib.rs index 3b613353..ab3e9d6a 100644 --- a/web/src/lib.rs +++ b/web/src/lib.rs @@ -1,7 +1,5 @@ //! A web runtime for Iced, targetting the DOM. //! -//! ![`iced_web` crate graph](https://github.com/hecrj/iced/blob/cae26cb7bc627f4a5b3bcf1cd023a0c552e8c65e/docs/graphs/web.png?raw=true) -//! //! `iced_web` takes [`iced_core`] and builds a WebAssembly runtime on top. It //! achieves this by introducing a `Widget` trait that can be used to produce //! VDOM nodes. diff --git a/wgpu/README.md b/wgpu/README.md index 67cb59dd..4483733c 100644 --- a/wgpu/README.md +++ b/wgpu/README.md @@ -15,7 +15,9 @@ Currently, `iced_wgpu` supports the following primitives: - Images and SVG, loaded from memory or the file system. - Meshes of triangles, useful to draw geometry freely. -![iced_wgpu](../docs/graphs/wgpu.png) +

+ The native target +

[documentation]: https://docs.rs/iced_wgpu [`iced_native`]: ../native diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 5f44dd91..a4c2ac0e 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -1,6 +1,6 @@ //! A [`wgpu`] renderer for [`iced_native`]. //! -//! ![`iced_wgpu` crate graph](https://github.com/hecrj/iced/blob/cae26cb7bc627f4a5b3bcf1cd023a0c552e8c65e/docs/graphs/wgpu.png?raw=true) +//! ![The native path of the Iced ecosystem](https://github.com/hecrj/iced/blob/0525d76ff94e828b7b21634fa94a747022001c83/docs/graphs/native.png?raw=true) //! //! For now, it is the default renderer of [Iced] in native platforms. //! diff --git a/winit/README.md b/winit/README.md index 34dec1b3..8916afce 100644 --- a/winit/README.md +++ b/winit/README.md @@ -8,7 +8,9 @@ It exposes a renderer-agnostic `Application` trait that can be implemented and then run with a simple call. The use of this trait is optional. A `conversion` module is provided for users that decide to implement a custom event loop. -![iced_winit](../docs/graphs/winit.png) +

+ The native target +

[documentation]: https://docs.rs/iced_winit [`iced_native`]: ../native diff --git a/winit/src/lib.rs b/winit/src/lib.rs index dfee99cb..c9f324dd 100644 --- a/winit/src/lib.rs +++ b/winit/src/lib.rs @@ -1,6 +1,6 @@ //! A windowing shell for Iced, on top of [`winit`]. //! -//! ![`iced_winit` crate graph](https://github.com/hecrj/iced/blob/cae26cb7bc627f4a5b3bcf1cd023a0c552e8c65e/docs/graphs/winit.png?raw=true) +//! ![The native path of the Iced ecosystem](https://github.com/hecrj/iced/blob/0525d76ff94e828b7b21634fa94a747022001c83/docs/graphs/native.png?raw=true) //! //! `iced_winit` offers some convenient abstractions on top of [`iced_native`] //! to quickstart development when using [`winit`].