diff --git a/examples/web_worker_fib/Cargo.toml b/examples/web_worker_fib/Cargo.toml index 2b5d265ffb1..609a0f6b50c 100644 --- a/examples/web_worker_fib/Cargo.toml +++ b/examples/web_worker_fib/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "yew-worker-demo" +name = "yew-worker-fib" version = "0.1.0" edition = "2018" author = "Shrey Somaiya" diff --git a/examples/web_worker_fib/README.md b/examples/web_worker_fib/README.md index 0d432c67942..128416d74e3 100644 --- a/examples/web_worker_fib/README.md +++ b/examples/web_worker_fib/README.md @@ -1,12 +1,17 @@ # Web Worker Demo -Calculate fibbonnaci value of a number in the worker thread, +Calculate fibbonnaci value of a number in the worker thread, without blocking the main thread. -You can access a live version here: +You can access a live version here: + +# Running this exmaple + +do `./build.sh && ./serve.sh` ## notes -This example is NOT built with [trunk](https://github.com/thedodd/trunk). + +This example is NOT built with [trunk](https://github.com/thedodd/trunk). Multi-threading in yew does not currently build with Trunk, due to issues described in the [multi_thread](/examples/multi_thread/README.md) example. Instead the example is built with [`wasm-pack`](https://rustwasm.github.io/wasm-pack/) directly. @@ -16,8 +21,7 @@ You can then serve the build, with `./serve.sh`. This example uses python3 as a server, any alternative will work. - # Thanks to -- [insou22](https://github.com/insou22) for writing up the demo. +- [insou22](https://github.com/insou22) for writing up the demo. - [https://github.com/yvt/img2text](https://github.com/yvt/img2text) -- for how to make web workers compile in wasm diff --git a/examples/web_worker_fib/serve.sh b/examples/web_worker_fib/serve.sh index f0f2920c9b0..b65aeeb5e5a 100755 --- a/examples/web_worker_fib/serve.sh +++ b/examples/web_worker_fib/serve.sh @@ -6,4 +6,4 @@ then fi cd static/ -python3 -m http.server +python3 -m http.server 8080