Skip to content

Commit

Permalink
fix stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
voidpumpkin committed Nov 21, 2021
1 parent 4d6942f commit fc198ee
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/web_worker_fib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "yew-worker-demo"
name = "yew-worker-fib"
version = "0.1.0"
edition = "2018"
author = "Shrey Somaiya"
Expand Down
14 changes: 9 additions & 5 deletions examples/web_worker_fib/README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
2 changes: 1 addition & 1 deletion examples/web_worker_fib/serve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ then
fi

cd static/
python3 -m http.server
python3 -m http.server 8080

0 comments on commit fc198ee

Please sign in to comment.