Skip to content

Commit

Permalink
Remove Wasmer WASI tests
Browse files Browse the repository at this point in the history
We no longer use it in carton
  • Loading branch information
kateinoigakukun committed May 8, 2024
1 parent 0ca84cd commit dceda05
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 369 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ jobs:
# Ensure that test succeeds with all toolchains and wasi backend combinations
- { os: ubuntu-20.04, toolchain: wasm-5.7.3-RELEASE, wasi-backend: Node }
- { os: ubuntu-20.04, toolchain: wasm-5.8.0-RELEASE, wasi-backend: Node }
- { os: ubuntu-20.04, toolchain: wasm-5.7.3-RELEASE, wasi-backend: Wasmer }
- { os: ubuntu-20.04, toolchain: wasm-5.8.0-RELEASE, wasi-backend: Wasmer }
- { os: ubuntu-20.04, toolchain: wasm-5.9.1-RELEASE, wasi-backend: Wasmer }
- { os: ubuntu-20.04, toolchain: wasm-5.7.3-RELEASE, wasi-backend: MicroWASI }
- { os: ubuntu-20.04, toolchain: wasm-5.8.0-RELEASE, wasi-backend: MicroWASI }
- { os: ubuntu-20.04, toolchain: wasm-5.9.1-RELEASE, wasi-backend: MicroWASI }
Expand Down
37 changes: 0 additions & 37 deletions IntegrationTests/lib.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const SwiftRuntime = require("javascript-kit-swift").SwiftRuntime;
const WasmerWASI = require("@wasmer/wasi").WASI;
const WasmFs = require("@wasmer/wasmfs").WasmFs;
const NodeWASI = require("wasi").WASI;
const { WASI: MicroWASI, useAll } = require("uwasi");

Expand All @@ -9,41 +7,6 @@ const fs = require("fs");
const readFile = promisify(fs.readFile);

const WASI = {
Wasmer: ({ programName }) => {
// Instantiate a new WASI Instance
const wasmFs = new WasmFs();
// Output stdout and stderr to console
const originalWriteSync = wasmFs.fs.writeSync;
wasmFs.fs.writeSync = (fd, buffer, offset, length, position) => {
const text = new TextDecoder("utf-8").decode(buffer);
switch (fd) {
case 1:
console.log(text);
break;
case 2:
console.error(text);
break;
}
return originalWriteSync(fd, buffer, offset, length, position);
};
const wasi = new WasmerWASI({
args: [programName],
env: {},
bindings: {
...WasmerWASI.defaultBindings,
fs: wasmFs.fs,
},
});

return {
wasiImport: wasi.wasiImport,
start(instance) {
wasi.start(instance);
instance.exports._initialize();
instance.exports.main();
}
}
},
MicroWASI: ({ programName }) => {
const wasi = new MicroWASI({
args: [programName],
Expand Down
Loading

0 comments on commit dceda05

Please sign in to comment.