mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
11 lines
326 B
JavaScript
11 lines
326 B
JavaScript
const fs = require('fs');
|
|
const process = require('process');
|
|
const assert = require('assert');
|
|
const buffer = fs.readFileSync(process.argv[2]);
|
|
|
|
let m = new WebAssembly.Module(buffer);
|
|
let list = WebAssembly.Module.imports(m);
|
|
console.log('imports', list);
|
|
if (list.length !== 0)
|
|
throw new Error("there are some imports");
|