Skip to content

Commit

Permalink
Update wasm-example's README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bschwind authored Oct 23, 2024
1 parent fa7a5f7 commit ba2a149
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/wasm-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ An example of model code which can be compiled to WASM and executed in the viewe
Use [cargo watch](https://crates.io/crates/cargo-watch) to listen for file changes and rebuild the model file whenever code is edited:

```
# From the project root
$ cargo watch -x "build -p wasm-example --release --target wasm32-unknown-unknown"
```

Run the viewer app with:

```
$ cargo run --release --no-default-features --bin viewer
# From the project root, while the "cargo watch" command above is running.
$ cargo run --release --bin viewer -- --wasm-path target/wasm32-unknown-unknown/release/wasm_example.wasm
```

Edit `src/lib.rs` and save to see the model code get recompiled, and see the model in the viewer app get updated.

0 comments on commit ba2a149

Please sign in to comment.