mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-01 06:46:20 +03:00
4ddd93d75d
* add char support * add char test * remove __wbindgen_char fns * re-order travis script * update serve script * remove binds to unused char functions * add more wide character items to chars list * remove unused code * add char to readme * remove built file
23 lines
759 B
Bash
Executable File
23 lines
759 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -ex
|
|
|
|
# Build the `hello_world.wasm` file using Cargo/rustc
|
|
cargo +nightly build --target wasm32-unknown-unknown
|
|
|
|
# Run the `wasm-bindgen` CLI tool to postprocess the wasm file emitted by the
|
|
# Rust compiler to emit the JS support glue that's necessary
|
|
#
|
|
# 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/cli/Cargo.toml \
|
|
--bin wasm-bindgen -- \
|
|
../../target/wasm32-unknown-unknown/debug/char.wasm --out-dir .
|
|
# wasm-bindgen ../../target/wasm32-unknown-unknown/hello_world.wasm --out-dir .
|
|
|
|
# Finally, package everything up using Webpack and start a server so we can
|
|
# browse the result
|
|
|
|
npm install
|
|
npm run serve
|