;; WASI Environment Variables. ;; ;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md) ;; for an explanation of what that means. (use "typenames.witx") (module $wasi_ephemeral_environ ;;; Linear memory to be accessed by WASI functions that need it. (import "memory" (memory)) ;;; Read environment variable data. ;;; The sizes of the buffers should match that returned by `sizes_get`. (@interface func (export "get") (param $environ (@witx pointer (@witx pointer char8))) (param $environ_buf (@witx pointer char8)) (result $error $errno) ) ;;; Return environment variable data sizes. (@interface func (export "sizes_get") (result $error $errno) ;;; The number of environment variable arguments. (result $environc $size) ;;; The size of the environment variable data. (result $environ_buf_size $size) ) )