mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-23 21:50:51 +00:00
Right now Webpack probably has the most mature support for loading wasm modules, so let's show off how to do that! Additionally this commits hello world as an example to the repository.
16 lines
499 B
Bash
Executable File
16 lines
499 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -ex
|
|
|
|
cargo +nightly build --target wasm32-unknown-unknown --release
|
|
|
|
# Here we're using the version of the CLI in this repository, but for external
|
|
# usage you'd use the commented out version below
|
|
cargo +nightly run --manifest-path ../../crates/wasm-bindgen-cli/Cargo.toml \
|
|
--bin wasm-bindgen -- \
|
|
../../target/wasm32-unknown-unknown/release/hello_world.wasm --out-dir .
|
|
# wasm-bindgen ../../target/wasm32-unknown-unknown/hello_world.wasm --out-dir .
|
|
|
|
npm install
|
|
npm run serve
|