mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
* script for building examples minimal example updated to work with wasm-pack minimal_wb exampel to be used with wasm-bindgen directly * minimal is wasm-bindgen as default ( wp wasm-pack ) * examples updated to work with wasm-bindgen * script to run all yew/examples * upated example doc, added script to multi-thread * cargo fmt, disabled build_examples.sh * one build.sh for examples, updated doc * removed build size optimalization * wasm-pack requirement info in lib.rs * Update examples/readme.md * Update examples/readme.md * Update examples/readme.md * Update examples/readme.md * Update examples/readme.md * Update examples/readme.md * Update examples/readme.md * Update examples/readme.md * Update examples/readme.md * Update examples/readme.md * Update examples/build.sh Co-Authored-By: Justin Starry <justin.m.starry@gmail.com> * Update examples/build.sh exit trap Co-Authored-By: Justin Starry <justin.m.starry@gmail.com> Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
multi_thread
First, build your web app
cargo build --target wasm32-unknown-unknown --bin multi_thread_app
wasm-bindgen --target web --no-typescript --out-dir static/ --out-name app ../../target/wasm32-unknown-unknown/debug/multi_thread_app.wasm
Then, build your web worker
cargo build --target wasm32-unknown-unknown --bin multi_thread_worker
wasm-bindgen --target no-modules --no-typescript --out-dir static/ --out-name worker ../../target/wasm32-unknown-unknown/debug/multi_thread_worker.wasm
Finally, serve the content from the ./static directory
python3 -m http.server