window.proxy_fetch = function () {
    return JSON.stringify({
        "result": "{\"a\": 111}"
    });
};

import { instantiate } from "./lib/boa_wasm_engine.generated.js";
const { run_js } = await instantiate();

async function main() {
    for (let i = 0; i < 10; i++) {
        console.log(run_js('let x = fetch();x.a;let v = [];while(true){v.push("[encoded data, 9108 characters];dlfjalsfjas;");};'));
    }
}

await main();
