Stream: git-wasmtime

Topic: wasmtime / PR #5189 c-api: add wasi_config_set_stdout_bytes


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

ShuP1 opened PR #5189 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_stdout in examples/wasi/main.c:79

wasi_config_t *wasi_config = wasi_config_new();
assert(wasi_config);
wasi_out_bytes_t *wasi_stderr = wasi_config_set_stderr_bytes(wasi_config, 32);
error = wasmtime_context_set_wasi(context, wasi_config);
// run and delete store
wasm_byte_vec_t wasi_message;
wasi_out_bytes_take(wasi_stderr, &wasi_message);
printf("stderr:\n%.*s\n", (int)wasi_message.size, wasi_message.data);

See https://github.com/bytecodealliance/wasmtime/commit/3174d9a9928b756c3427403096a05c87bb2bb988

(cc @alexcrichton)

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

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

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2022 at 10:21):

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

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

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2022 at 12:52):

ShuP1 closed without merge PR #5189.


Last updated: Dec 23 2024 at 12:05 UTC