From e8b0ff50fe2f162067399a6e44d6578194fbe848 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Mon, 6 May 2024 11:27:11 -0700 Subject: [PATCH] update index.js from universal lambda project --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index ad90552..f7670ec 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ -import demoWasm from "demo.wasm"; +import customWasm from "custom.wasm"; export default { async fetch(request, _env2, ctx) { const stdout = new TransformStream(); @@ -11,7 +11,7 @@ export default { }); const wasi = new WASI({ args: [ - "./demo.wasm", + "./custom.wasm", // In a CLI, the first arg is the name of the exe "--url=" + request.url, // this contains the target but is the full url, so we will use a different arg for this @@ -22,7 +22,7 @@ export default { stdin: request.body, stdout: stdout.writable }); - const instance = new WebAssembly.Instance(demoWasm, { + const instance = new WebAssembly.Instance(customWasm, { wasi_snapshot_preview1: wasi.wasiImport }); ctx.waitUntil(wasi.start(instance));