Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: rand 0.9 RUSTFLAGS instruction #3816

Merged
merged 1 commit into from
Mar 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>`.
Expand Down
4 changes: 2 additions & 2 deletions examples/boids/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
4 changes: 2 additions & 2 deletions examples/function_memory_game/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
6 changes: 3 additions & 3 deletions examples/game_of_life/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```
4 changes: 2 additions & 2 deletions examples/keyed_list/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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