mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
docs: rand 0.9 RUSTFLAGS instruction
This commit is contained in:
parent
1555e5b4c6
commit
550b2ccf25
@ -15,6 +15,12 @@ cd examples/todomvc
|
||||
trunk serve --open
|
||||
```
|
||||
|
||||
Some examples using the `rand` crate require a special rust flag to be enabled:
|
||||
|
||||
```bash
|
||||
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' trunk serve --open
|
||||
```
|
||||
|
||||
Some examples may perform better using the `release` profile. If something is slow, you can try running it with the `--release` argument.
|
||||
|
||||
We're also publicly hosting the examples at `https://examples.yew.rs/<EXAMPLE>`.
|
||||
|
||||
@ -27,5 +27,5 @@ The example uses [`gloo::timers`](https://docs.rs/gloo-timers/latest/gloo_timers
|
||||
Run this application with the trunk development server:
|
||||
|
||||
```bash
|
||||
trunk serve --open
|
||||
```
|
||||
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' trunk serve --open
|
||||
```
|
||||
|
||||
@ -19,5 +19,5 @@ Images are authorized by [@bradlygreen](https://github.com/bradlygreen), see [au
|
||||
Run this application with the trunk development server:
|
||||
|
||||
```bash
|
||||
trunk serve --open
|
||||
```
|
||||
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' trunk serve --open
|
||||
```
|
||||
|
||||
@ -10,7 +10,7 @@ You can manually toggle cells by clicking on them or create a random layout by p
|
||||
This example is quite resource intensive; it's recommended that you only use it with the `--release` flag:
|
||||
|
||||
```bash
|
||||
trunk serve --release
|
||||
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' trunk serve --release
|
||||
```
|
||||
|
||||
## Concepts
|
||||
@ -23,5 +23,5 @@ trunk serve --release
|
||||
Run this application with the trunk development server:
|
||||
|
||||
```bash
|
||||
trunk serve --open
|
||||
```
|
||||
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' trunk serve --open
|
||||
```
|
||||
|
||||
@ -23,5 +23,5 @@ Demonstrates how using keyed elements improves the performance of comparing chan
|
||||
Run this application with the trunk development server:
|
||||
|
||||
```bash
|
||||
trunk serve --open
|
||||
```
|
||||
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' trunk serve --open
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user