mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
Update README
This commit is contained in:
parent
e9c7c125ea
commit
cfe88e9084
13
README.md
13
README.md
@ -296,15 +296,11 @@ There are many examples that show how the framework works:
|
||||
[counter], [crm], [custom_components], [dashboard], [fragments],
|
||||
[game_of_life], [mount_point], [npm_and_rest], [timer], [todomvc], [two_apps].
|
||||
|
||||
To run them you need to have [cargo-web] installed as well as a suitable target
|
||||
for the Rust compiler to generate web output. By default cargo-web uses
|
||||
`asmjs-unknown-emscripten`. Install cargo-web and the asmjs emscripten target
|
||||
as follows:
|
||||
To run them you need to have [cargo-web] installed:
|
||||
|
||||
$ cargo install cargo-web
|
||||
$ rustup target add asmjs-unknown-emscripten
|
||||
|
||||
To start an example enter its directory start it with [cargo-web]:
|
||||
To start an example enter its directory and start it with [cargo-web]:
|
||||
|
||||
$ cargo web start
|
||||
|
||||
@ -312,6 +308,11 @@ To run an optimised build instead of a debug build use:
|
||||
|
||||
$ cargo web start --release
|
||||
|
||||
By default `cargo-web` will use Emscripten to generate asm.js. You can also
|
||||
compile to WebAssembly if you add either `--target=wasm32-unknown-emscripten` or
|
||||
`--target=wasm32-unknown-unknown`, where the first one will use Emscripten and
|
||||
the second one will use Rust's native WebAssembly backend (Rust nightly only!).
|
||||
|
||||
[counter]: examples/counter
|
||||
[crm]: examples/crm
|
||||
[custom_components]: examples/custom_components
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user