summaryrefslogtreecommitdiff
path: root/demo/wasm2wat/demo.js
diff options
context:
space:
mode:
authorBen Smith <binjimin@gmail.com>2018-06-04 15:39:39 -0700
committerGitHub <noreply@github.com>2018-06-04 15:39:39 -0700
commit29281771e9cd3896d8ee83c960b87d0d5bd3436d (patch)
treeeb248cf55b80dd93afef6dfaaa14fa5bd5273158 /demo/wasm2wat/demo.js
parenta9829fff6a5345d6b7ae6cbbbca70c7c03f22fe0 (diff)
downloadwabt-29281771e9cd3896d8ee83c960b87d0d5bd3436d.tar.gz
wabt-29281771e9cd3896d8ee83c960b87d0d5bd3436d.tar.bz2
wabt-29281771e9cd3896d8ee83c960b87d0d5bd3436d.zip
Fix emscripten build (#855)
It's not correct to use `--pre-js` and `--post-js` to wrap the module in a function instance; instead we're supposed to use `-s MODULARIZE=1`. This still keeps the build as (almost) asm.js, as switching to wasm is a bit more work (we need to preload the wasm binary module). This fixes issue #853.
Diffstat (limited to 'demo/wasm2wat/demo.js')
-rw-r--r--demo/wasm2wat/demo.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/demo/wasm2wat/demo.js b/demo/wasm2wat/demo.js
index a1b6b442..fe14406b 100644
--- a/demo/wasm2wat/demo.js
+++ b/demo/wasm2wat/demo.js
@@ -38,7 +38,7 @@ function compile(contents) {
var foldExprs = foldExprsEl.checked;
var inlineExport = inlineExportEl.checked;
- wabt.ready.then(function() {
+ WabtModule().then(function(wabt) {
try {
var module = wabt.readWasm(contents, {readDebugNames: readDebugNames});
if (generateNames) {