mirror of
https://github.com/LukeHagar/wasm-overhead-research.git
synced 2025-12-06 04:22:06 +00:00
- 5 different JS-to-WASM implementations analyzed - QuickJS (283KB) and Javy Static (519KB) are Wasmer-compatible - Comprehensive size analysis and runtime compatibility testing - Complete documentation and build automation - Wasmer v6.1.0-rc.2 dynamic linking analysis included
13 lines
332 B
JavaScript
13 lines
332 B
JavaScript
|
|
let imports = {};
|
|
let wasm;
|
|
|
|
const path = require('path').join(__dirname, 'quickjs_transform_bg.wasm');
|
|
const bytes = require('fs').readFileSync(path);
|
|
|
|
const wasmModule = new WebAssembly.Module(bytes);
|
|
const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
|
wasm = wasmInstance.exports;
|
|
module.exports.__wasm = wasm;
|
|
|