Skip to content

Commit ce2e1ca

Browse files
committed
test(rfc): use portable Node WASI runner
1 parent d5ad6e1 commit ce2e1ca

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

rfc.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"runOptions": {
1717
"runtime": {
18-
"cmd": "wago <file>"
18+
"cmd": "node ./scripts/run-as-test-wasi.mjs <file>"
1919
}
2020
},
2121
"modes": {

scripts/run-as-test-wasi.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { instantiate } from "as-test/lib";
2+
3+
const wasmPath = process.argv[2];
4+
if (!wasmPath) throw new Error("Expected a WebAssembly test file path");
5+
6+
process.env.AS_TEST_WASM_PATH = wasmPath;
7+
const instance = await instantiate({});
8+
instance.exports.start?.();

0 commit comments

Comments
 (0)