wasm-bindgen/examples/hello_world
2018-03-03 10:46:43 -08:00
..
src Rewrite the README using Webpack 2018-03-02 20:12:00 -08:00
.gitignore Add workaround for hello_world running in Chrome 2018-03-03 10:46:43 -08:00
build.sh Add workaround for hello_world running in Chrome 2018-03-03 10:46:43 -08:00
Cargo.toml Rewrite the README using Webpack 2018-03-02 20:12:00 -08:00
index.html Rewrite the README using Webpack 2018-03-02 20:12:00 -08:00
index.js Add workaround for hello_world running in Chrome 2018-03-03 10:46:43 -08:00
package.json Rewrite the README using Webpack 2018-03-02 20:12:00 -08:00
README.md Add workaround for hello_world running in Chrome 2018-03-03 10:46:43 -08:00
webpack.config.js Rewrite the README using Webpack 2018-03-02 20:12:00 -08:00

Hello, World!

This directory is an example of using the #[wasm_bindgen] macro to create an entry point that's called from the browser and then displays a dialog.

You can build the example with:

$ ./build.sh

(or running the two commands on Windows manually)

and then opening up index.html in a web browser should show a dialog!

In Chrome, you'll need to delete hello_world_wasm.wasm after building (or change hello_world.js to import hello_world_wasm.js instead) and uncomment the relevant line in index.js to work around a webpack bug.