summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-10-23 02:35:24 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-10-23 02:35:24 +0200
commit1788d5d21e9416edc470c910aceab4b416844829 (patch)
treeef4d09e099fff96bfb37fa5b04c2d88ed843b8c6
parent7fdd7f595269eb043bbd7f392c2750783fa0a4b7 (diff)
downloadiced-1788d5d21e9416edc470c910aceab4b416844829.tar.gz
iced-1788d5d21e9416edc470c910aceab4b416844829.tar.bz2
iced-1788d5d21e9416edc470c910aceab4b416844829.zip
Update `README`s
-rw-r--r--README.md3
-rw-r--r--examples/README.md14
2 files changed, 13 insertions, 4 deletions
diff --git a/README.md b/README.md
index f7035fb4..fafa7b15 100644
--- a/README.md
+++ b/README.md
@@ -87,10 +87,9 @@ __view logic__:
```rust
use iced::{Button, Column, Text};
-use iced_wgpu::Renderer; // Iced does not include a renderer! We need to bring our own!
impl Counter {
- pub fn view(&mut self) -> Column<Message, Renderer> {
+ pub fn view(&mut self) -> Column<Message> {
// We use a column: a simple vertical layout
Column::new()
.push(
diff --git a/examples/README.md b/examples/README.md
index fe69b34a..ec2a9396 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -37,7 +37,7 @@ __update logic__ and __view logic__.
[`wgpu`]: https://github.com/gfx-rs/wgpu-rs
#### Running the native version
-Simply use [Cargo](https://doc.rust-lang.org/cargo/reference/manifest.html#examples)
+Use [Cargo](https://doc.rust-lang.org/cargo/reference/manifest.html#examples)
to run the example:
```
@@ -45,10 +45,20 @@ cargo run --example tour
```
#### Running the web version
+Build using the `wasm32-unknown-unknown` target and use the [`wasm-bindgen`] CLI
+to generate appropriate bindings in a `tour` directory.
+
```
-TODO
+cd examples
+cargo build --example tour --target wasm32-unknown-unknown
+wasm-bindgen ../target/wasm32-unknown-unknown/debug/examples/tour.wasm --out-dir tour --web
```
+Finally, serve the `examples` directory using an HTTP server, and access the
+`tour.html` file.
+
+[`wasm-bindgen`]: https://github.com/rustwasm/wasm-bindgen
+
## [Coffee]