Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 1.4 KB

README.md

File metadata and controls

20 lines (12 loc) · 1.4 KB

Webview using the YEW framework with Web sys

This is an example that showcases a usage of the webview rust bindings library with the yew framework.

This reproduces the exact same example provided here, but instead of serving the output of wasm-pack, it embeds it into an executable which is the webview

This is inspired from this example but uses warp + tokio instead of hyper for the server and the web-sys instead of stdweb as it seems to be recommended by the yew documentation

Quickstart

just run make run

Manually run

  • First, you'll need to have wasm-pack installed cargo install wasm-pack
  • Then, generate all of the web stuff in the static directory: cd todomvc && wasm-pack build --target web --out-name wasm --out-dir ../static
  • Now run the webview that embeds the output of the previous step: cargo run --release
  • To only build cargo build --release

image