Read environment variable data.
environ_get() function is used to read the environment variable data. It writes the environment variable pointers and string data to the specified buffers. The sizes of the buffers should match the values returned by the
;;; Key/value pairs are expected to be joined with `=`s, and terminated with `\0`s. ;;; The sizes of the buffers should match that returned by `environ_sizes_get`. ;;; Read environment variable data. (@interface func (export "environ_get") (param $environ (@witx pointer (@witx pointer u8))) (param $environ_buf (@witx pointer u8)) (result $error (expected (error $errno))) )
ctx: A mutable reference to the function environment.
environ: A WebAssembly pointer to a buffer where the environment variable pointers will be written.
environ_buf: A WebAssembly pointer to a buffer where the environment variable string data will be written.
The function returns an
Errno value indicating the success or failure of the operation.
This function has been instrumented with debug-level logging.
environ_get() function reads the environment variable data and writes the environment variable pointers and string data to the specified buffers. The actual data is retrieved from the WebAssembly module's state.