summaryrefslogtreecommitdiffstats
path: root/examples/counter
diff options
context:
space:
mode:
Diffstat (limited to 'examples/counter')
-rw-r--r--examples/counter/Cargo.toml4
-rw-r--r--examples/counter/README.md8
2 files changed, 12 insertions, 0 deletions
diff --git a/examples/counter/Cargo.toml b/examples/counter/Cargo.toml
index 1e9bba6b..22f86064 100644
--- a/examples/counter/Cargo.toml
+++ b/examples/counter/Cargo.toml
@@ -7,3 +7,7 @@ publish = false
[dependencies]
iced.workspace = true
+
+[target.'cfg(target_arch = "wasm32")'.dependencies]
+iced.workspace = true
+iced.features = ["webgl"]
diff --git a/examples/counter/README.md b/examples/counter/README.md
index 53243c24..18761bba 100644
--- a/examples/counter/README.md
+++ b/examples/counter/README.md
@@ -13,4 +13,12 @@ You can run it with `cargo run`:
cargo run --package counter
```
+The web version can be run with [`trunk`]:
+
+```
+cd examples/counter
+trunk serve
+```
+
[`main`]: src/main.rs
+[`trunk`]: https://trunkrs.dev/