Wasmex.Pipe (Wasmex v0.7.0)
A Pipe is a memory buffer that can be used in exchange for a WASM file. It can be used, for example, to capture stdout/stdin/stderr of a WASI program.
Link to this section Summary
Functions
Creates and returns a new Pipe.
Reads all available bytes from the Pipe and returns them as a binary.
Attempts to resize the pipe to the given number of bytes.
Returns the current size in bytes of the Pipe.
Writes the given binary into the pipe.
Link to this section Types
Link to this section Functions
Link to this function
create()
Creates and returns a new Pipe.
Link to this function
read(pipe)
Reads all available bytes from the Pipe and returns them as a binary.
Link to this function
set_len(pipe, len)
Attempts to resize the pipe to the given number of bytes.
Link to this function
size(pipe)
Returns the current size in bytes of the Pipe.
Link to this function
wrap_resource(resource)
Link to this function
write(pipe, binary)
Writes the given binary into the pipe.