implement std.Progress IPC for WASI #20104
Labels
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
os-wasi
standard library
This issue involves writing Zig code for the standard library.
Milestone
Extracted from #20059.
The Zig Progress ABI uses a POSIX pipe for the file descriptor passed to the child process for reporting progress. WASI does not support POSIX but it does have a mechanism we can use for this purpose which is a "preopen".
Let's define
/ZIG_PROGRESS
as a special preopen name that can be used for WASI applications to send progress updates over. WASI applications would not support being the parent process since they don't have the ability to output escape codes to the terminal, but they would support being the child.This issue might be tricky because it might require features added to external projects such as wasmtime. In particular we need the ability to create a pipe, and spawn wasmtime as a child process, passing the pipe as
/ZIG_PROGRESS
preopen. We'll need to work with third party projects to find out the best way to accomplish this.This issue can be closed when a parent process compiled to native machine code can spawn a third party executor such as wasmtime as a child process, which runs a zig program compiled to
wasm32-wasi
, and the child process communicates its progress viastd.Progress
to the parent.The text was updated successfully, but these errors were encountered: