summaryrefslogtreecommitdiffstats
path: root/examples/todos
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2023-09-09 23:24:54 +0200
committerLibravatar GitHub <noreply@github.com>2023-09-09 23:24:54 +0200
commita3489e4af960388e9f73988b88df361022a654a4 (patch)
treef5bb9754aa08c4e2f27a025cf570c2f40d369d2e /examples/todos
parente3aa8f71e6d27135ddc3bddf2a141fe42375b3f9 (diff)
parentfbc9ef74c406b2a58bb2a093262323e346faf485 (diff)
downloadiced-a3489e4af960388e9f73988b88df361022a654a4.tar.gz
iced-a3489e4af960388e9f73988b88df361022a654a4.tar.bz2
iced-a3489e4af960388e9f73988b88df361022a654a4.zip
Merge pull request #2076 from Nisatru/run-web
Get web examples running again
Diffstat (limited to 'examples/todos')
-rw-r--r--examples/todos/Cargo.toml3
-rw-r--r--examples/todos/README.md9
2 files changed, 11 insertions, 1 deletions
diff --git a/examples/todos/Cargo.toml b/examples/todos/Cargo.toml
index fea20375..3334d84f 100644
--- a/examples/todos/Cargo.toml
+++ b/examples/todos/Cargo.toml
@@ -18,6 +18,9 @@ async-std.workspace = true
directories-next = "2.0"
[target.'cfg(target_arch = "wasm32")'.dependencies]
+iced.workspace = true
+iced.features = ["debug", "webgl"]
+
web-sys = { workspace = true, features = ["Window", "Storage"] }
wasm-timer.workspace = true
diff --git a/examples/todos/README.md b/examples/todos/README.md
index 852dd88d..5e42f166 100644
--- a/examples/todos/README.md
+++ b/examples/todos/README.md
@@ -14,7 +14,14 @@ You can run the native version with `cargo run`:
```
cargo run --package todos
```
-We have not yet implemented a `LocalStorage` version of the auto-save feature. Therefore, it does not work on web _yet_!
+
+The web version can be run with [`trunk`]:
+
+```
+cd examples/todos
+trunk serve
+```
[`main`]: src/main.rs
[TodoMVC]: http://todomvc.com/
+[`trunk`]: https://trunkrs.dev/