Skip to content

Commit 16a37a2

Browse files
committed
Set wasi arguments to satisfy proxy-wasm spec requirements
Signed-off-by: Hiram Chirino <hiram@hiramchirino.com>
1 parent d52f912 commit 16a37a2

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

src/main/java/io/roastedroot/proxywasm/ABI.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,16 +1891,4 @@ void proxyOnForeignFunction(int contextId, int functionId, int argumentsSize) {
18911891
}
18921892
proxyOnForeignFunctionFn.apply(contextId, functionId, argumentsSize);
18931893
}
1894-
1895-
// //////////////////////////////////////////////////////////////////////
1896-
// Unimplemented WASI functions
1897-
// //////////////////////////////////////////////////////////////////////
1898-
1899-
// wasi_snapshot_preview1.args_sizes_get :
1900-
// https://github.com/proxy-wasm/spec/tree/main/abi-versions/vNEXT#wasi_snapshot_preview1args_sizes_get
1901-
// wasi_snapshot_preview1.args_get :
1902-
// https://github.com/proxy-wasm/spec/tree/main/abi-versions/vNEXT#wasi_snapshot_preview1args_get
1903-
// wasi_snapshot_preview1.proc_exit :
1904-
// https://github.com/proxy-wasm/spec/tree/main/abi-versions/vNEXT#wasi_snapshot_preview1proc_exit
1905-
19061894
}

src/main/java/io/roastedroot/proxywasm/ProxyWasm.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,12 @@ public ProxyWasm build(Instance.Builder instanceBuilder) throws StartException {
355355
WasiPreview1.builder()
356356
.withOptions(
357357
Objects.requireNonNullElseGet(
358-
wasiOptions, this::defaultWasiOptions))
358+
wasiOptions,
359+
() ->
360+
WasiOptions.builder()
361+
.inheritSystem()
362+
.withArguments(List.of())
363+
.build()))
359364
.build();
360365
imports.addFunction(wasi.toHostFunctions());
361366
imports.addFunction(Helpers.withModuleName(wasi.toHostFunctions(), "wasi_unstable"));

0 commit comments

Comments
 (0)