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:79wasi_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)
ShuP1 updated PR #5189 from c-api-stdio-buffer
to main
.
ShuP1 updated PR #5189 from c-api-stdio-buffer
to main
.
alexcrichton submitted PR review.
ShuP1 closed without merge PR #5189.
Last updated: Dec 23 2024 at 12:05 UTC