mirror of
https://github.com/LukeHagar/wasm-overhead-research.git
synced 2025-12-09 04:22:12 +00:00
Initial commit: JavaScript to WebAssembly compilation comparison
- 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
This commit is contained in:
19
implementations/quickjs/quickjs-test.js
Normal file
19
implementations/quickjs/quickjs-test.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import { transformData } from "./quickjs-adapter.js";
|
||||
|
||||
const testData = JSON.stringify({
|
||||
users: [
|
||||
{ name: "Alice", age: 30 },
|
||||
{ name: "Bob", age: 25 },
|
||||
],
|
||||
});
|
||||
|
||||
console.log("Testing QuickJS implementation...");
|
||||
console.log("Input:", testData);
|
||||
|
||||
try {
|
||||
const result = transformData(testData);
|
||||
console.log("Output:", result);
|
||||
console.log("✅ QuickJS implementation working!");
|
||||
} catch (error) {
|
||||
console.error("❌ QuickJS implementation failed:", error.message);
|
||||
}
|
||||
Reference in New Issue
Block a user