Debug mode is no longer buggy

Tweak instructions in README
This commit is contained in:
Alex Crichton 2018-03-22 19:10:00 -07:00
parent a8799c049f
commit a4ed4331dd

View File

@ -104,25 +104,19 @@ of `alert` ensures that the right shims are generated.
Next up let's build our project: Next up let's build our project:
``` ```
$ cargo build --release --target wasm32-unknown-unknown $ cargo build --target wasm32-unknown-unknown
``` ```
Note that we're using `--release` here because unfortunately the current LLVM
backend for wasm has a few bugs in non-optimized mode. Those bugs will hopefully
get smoothed out over time!
After this you'll have a wasm file at After this you'll have a wasm file at
`target/wasm32-unknown-unknown/release/js_hello_world.wasm`. If you'd like you `target/wasm32-unknown-unknown/debug/js_hello_world.wasm`. Don't be alarmed at
can use [wasm-gc] to make this file a little smaller the size, this is an unoptimized program!
[wasm-gc]: https://github.com/alexcrichton/wasm-gc
Now that we've generated the wasm module it's time to run the bindgen tool Now that we've generated the wasm module it's time to run the bindgen tool
itself! This tool will postprocess the wasm file rustc generated, generating a itself! This tool will postprocess the wasm file rustc generated, generating a
new wasm file and a set of JS bindings as well. Let's invoke it! new wasm file and a set of JS bindings as well. Let's invoke it!
``` ```
$ wasm-bindgen target/wasm32-unknown-unknown/release/js_hello_world.wasm \ $ wasm-bindgen target/wasm32-unknown-unknown/debug/js_hello_world.wasm \
--out-dir . --out-dir .
``` ```