Add README
for tour
example
This commit is contained in:
parent
7cea737115
commit
e2ec092aec
@ -4,36 +4,6 @@ you want to learn about a specific release, check out [the release list].
|
|||||||
|
|
||||||
[the release list]: https://github.com/hecrj/iced/releases
|
[the release list]: https://github.com/hecrj/iced/releases
|
||||||
|
|
||||||
## [Tour](tour.rs)
|
|
||||||
|
|
||||||
A simple UI tour that can run both on native platforms and the web! It showcases different widgets that can be built using Iced.
|
|
||||||
|
|
||||||
The __[`tour`]__ file contains all the code of the example! All the cross-platform GUI is defined in terms of __state__, __messages__, __update logic__ and __view logic__.
|
|
||||||
|
|
||||||
<div align="center">
|
|
||||||
<a href="https://gfycat.com/politeadorableiberianmole">
|
|
||||||
<img src="https://thumbs.gfycat.com/PoliteAdorableIberianmole-small.gif">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
[`tour`]: tour.rs
|
|
||||||
[`iced_winit`]: ../winit
|
|
||||||
[`iced_native`]: ../native
|
|
||||||
[`iced_wgpu`]: ../wgpu
|
|
||||||
[`iced_web`]: ../web
|
|
||||||
[`winit`]: https://github.com/rust-windowing/winit
|
|
||||||
[`wgpu`]: https://github.com/gfx-rs/wgpu-rs
|
|
||||||
|
|
||||||
You can run the native version with `cargo run`:
|
|
||||||
```
|
|
||||||
cargo run --example tour
|
|
||||||
```
|
|
||||||
|
|
||||||
The web version can be run by following [the usage instructions of `iced_web`] or by accessing [iced.rs](https://iced.rs/)!
|
|
||||||
|
|
||||||
[the usage instructions of `iced_web`]: ../web#usage
|
|
||||||
|
|
||||||
|
|
||||||
## [Todos](todos.rs)
|
## [Todos](todos.rs)
|
||||||
|
|
||||||
A simple todos tracker inspired by [TodoMVC]. It showcases dynamic layout, text input, checkboxes, scrollables, icons, and async actions! It automatically saves your tasks in the background, even if you did not finish typing them.
|
A simple todos tracker inspired by [TodoMVC]. It showcases dynamic layout, text input, checkboxes, scrollables, icons, and async actions! It automatically saves your tasks in the background, even if you did not finish typing them.
|
||||||
|
@ -6,7 +6,7 @@ edition = "2018"
|
|||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
iced = { path = "../.." }
|
iced = { path = "../..", features = ["debug"] }
|
||||||
env_logger = "0.7"
|
env_logger = "0.7"
|
||||||
|
|
||||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||||
|
28
examples/tour/README.md
Normal file
28
examples/tour/README.md
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
## Tour
|
||||||
|
|
||||||
|
A simple UI tour that can run both on native platforms and the web! It showcases different widgets that can be built using Iced.
|
||||||
|
|
||||||
|
The __[`main`]__ file contains all the code of the example! All the cross-platform GUI is defined in terms of __state__, __messages__, __update logic__ and __view logic__.
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<a href="https://gfycat.com/politeadorableiberianmole">
|
||||||
|
<img src="https://thumbs.gfycat.com/PoliteAdorableIberianmole-small.gif">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
[`main`]: src/main.rs
|
||||||
|
[`iced_winit`]: ../../winit
|
||||||
|
[`iced_native`]: ../../native
|
||||||
|
[`iced_wgpu`]: ../../wgpu
|
||||||
|
[`iced_web`]: ../../web
|
||||||
|
[`winit`]: https://github.com/rust-windowing/winit
|
||||||
|
[`wgpu`]: https://github.com/gfx-rs/wgpu-rs
|
||||||
|
|
||||||
|
You can run the native version with `cargo run`:
|
||||||
|
```
|
||||||
|
cargo run --package tour
|
||||||
|
```
|
||||||
|
|
||||||
|
The web version can be run by following [the usage instructions of `iced_web`] or by accessing [iced.rs](https://iced.rs/)!
|
||||||
|
|
||||||
|
[the usage instructions of `iced_web`]: ../../web#usage
|
@ -35,7 +35,7 @@ For instance, let's say we want to build the [`tour` example]:
|
|||||||
|
|
||||||
```
|
```
|
||||||
cd examples
|
cd examples
|
||||||
cargo build --example tour --target wasm32-unknown-unknown
|
cargo build --package tour --target wasm32-unknown-unknown
|
||||||
wasm-bindgen ../target/wasm32-unknown-unknown/debug/examples/tour.wasm --out-dir tour --web
|
wasm-bindgen ../target/wasm32-unknown-unknown/debug/examples/tour.wasm --out-dir tour --web
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user