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

Make a note about fn render() problem and point a fix #240

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions src/game-of-life/implementing.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,14 @@ With that, the Rust half of our Game of Life implementation is complete!
Recompile it to WebAssembly by running `wasm-pack build` within the
`wasm-game-of-life` directory.

> Note: if `wasm-pack build` doesn't compile (due to [#886](https://github.com/rustwasm/wasm-pack/issues/886) issue),
> append your `Cargo.toml` with following:
> ```toml
> [package.metadata.wasm-pack.profile.release]
> wasm-opt = ["-Os", "--enable-mutable-globals"]
> ```
> You can replace `-Os` flag with a [variety](https://rustwasm.github.io/book/reference/code-size.html#use-the-wasm-opt-tool) of optimization levels.

## Rendering with JavaScript

First, let's add a `<pre>` element to `wasm-game-of-life/www/index.html` to
Expand Down