Stream: git-wasmtime

Topic: wasmtime / PR #5179 c-api: add wasi_config_set_stdin_bytes


view this post on Zulip Wasmtime GitHub notifications bot (Nov 02 2022 at 14:46):

ShuP1 opened PR #5179 from c-api-stdio-buffer to main:

As discussed in issue #4372 and respective issues about python and go bindings.

Can replace wasi_config_inherit_stdin in examples/wasi/main.c:78

wasi_config_t *wasi_config = wasi_config_new();
assert(wasi_config);
wasm_byte_vec_t binary;
wasm_name_new_from_string_nt(&binary, "sent to stdin");
wasi_config_set_stdin_bytes(wasi_config, &binary);
error = wasmtime_context_set_wasi(context, wasi_config);

(cc @alexcrichton)

view this post on Zulip Wasmtime GitHub notifications bot (Nov 02 2022 at 17:09):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 02 2022 at 17:09):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 02 2022 at 17:09):

alexcrichton created PR review comment:

Since this takes owneship of the argument here I think it might be good to drop the const qualifier since it's actually mutated.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 02 2022 at 17:16):

ShuP1 updated PR #5179 from c-api-stdio-buffer to main.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 02 2022 at 19:27):

alexcrichton merged PR #5179.


Last updated: Oct 23 2024 at 20:03 UTC