blob: f61af0096589ce1b2ea9b81a067aecf933ffe655 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
function assert(x) {
if (!x) throw 'error!';
}
Binaryen.setAPITracing(true);
var module = new Binaryen.Module();
module.addCustomSection("hello", [119, 111, 114, 108, 100]);
assert(module.validate());
console.log(module.emitText());
|