blob: 4434584b522d6034d95cb928c855bd57b55dfb39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
var module = new Binaryen.Module();
var signature = module.addFunctionType("v", Binaryen.none, []);
module.addImport("fn", "env", "fn", signature);
module.addFunction("main", signature, [], module.block("", [
module.call("fn", [], Binaryen.none) // should be callImport
]));
module.addExport("main", "main");
console.log(module.emitText());
module.validate(); // fails
|