mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2025-01-07 13:43:03 +03:00
parent
a1520c4e5d
commit
7993d911f2
@ -3,12 +3,13 @@
|
|||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
# Compile our wasm module and run `wasm-bindgen`
|
# Compile our wasm module and run `wasm-bindgen`
|
||||||
wasm-pack build --target web
|
wasm-pack build
|
||||||
|
|
||||||
# Run the `wasm2js` tool from `binaryen`
|
# Run the `wasm2js` tool from `binaryen`
|
||||||
wasm2js pkg/wasm2js_bg.wasm -o pkg/wasm2js_bg.js
|
wasm2js pkg/wasm2js_bg.wasm -o pkg/wasm2js_bg.wasm.js
|
||||||
|
|
||||||
# Update our JS shim to require the JS file instead
|
# Update our JS shim to require the JS file instead
|
||||||
sed -i 's/wasm2js_bg.wasm/wasm2js_bg.js/' pkg/wasm2js.js
|
sed -i 's/wasm2js_bg.wasm/wasm2js_bg.wasm.js/' pkg/wasm2js.js
|
||||||
|
sed -i 's/wasm2js_bg.wasm/wasm2js_bg.wasm.js/' pkg/wasm2js_bg.js
|
||||||
|
|
||||||
http
|
http
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Import our JS shim and initialize it, executing the start function when it's
|
// Import our JS shim; will initialize by itself
|
||||||
// ready.
|
import { run } from './pkg/wasm2js.js';
|
||||||
import init from './pkg/wasm2js.js';
|
// Run the function a second time
|
||||||
init();
|
run();
|
||||||
|
Loading…
Reference in New Issue
Block a user