mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-28 20:43:23 +03:00
19d6cf1488
* backend comments complete * better matching * gen comments * Add example * Move test bindings gen to own fn * move build step into build fn * add fn to read js, refactor gen_bindings/test to allow for this * Add comments test * Update readmes * add comments to travis * fix broken tests * +x on build.sh * fix wbg cmd in build.sh * Address fitzgen's comments
20 lines
735 B
Bash
Executable File
20 lines
735 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -ex
|
|
# Build the comments project
|
|
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/comments.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 |