mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-26 15:32:16 +00:00
14 lines
373 B
JavaScript
14 lines
373 B
JavaScript
|
var binaryen = require("binaryen");
|
||
|
|
||
|
// "unexpected false: module function exports must be found"
|
||
|
|
||
|
var mod = new binaryen.Module();
|
||
|
|
||
|
var funcType = mod.addFunctionType("v", binaryen.none, []);
|
||
|
var func = mod.addImport("test", "env", "test", funcType);
|
||
|
mod.addExport("test", "test");
|
||
|
|
||
|
console.log(mod.emitText());
|
||
|
if (!mod.validate())
|
||
|
console.log("-> does not validate");
|