ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 913 microarchs · 15,555 chips · 105 sources
Arch:
Tier:

wasi:environ_get

T1 wasm syscall syscall
WASI Preview 1 Syscall: environ_get
SourceWASI Snapshot Preview 1 System Call Interface (WebAssembly/WASI) (wasi_syscalls)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeWASI Preview 1 (wasip1)
WebAssembly WASI Preview 1 (Wasmtime, WasmEdge, Wasmer, WAMR, Node.js)
License & VersionW3C Community CLA
wasi_snapshot_preview1
Upstreamhttps://github.com/WebAssembly/WASI/blob/wasi-0.1/preview1/witx/wasi_snapshot_preview1.witx
Privilegeguest->host
ExtensionsWASI, wasip1, wasi_snapshot_preview1

Summary

WASI wasi_snapshot_preview1 host syscall environ_get. Read environment variable data. The sizes of the buffers should match that returned by environ_sizes_get. Key/value pairs are expected to be joined with =s, and terminated with \0s.

Syntax / Encoding

wasi_snapshot_preview1::environ_get(environ: (@witx pointer (@witx pointer u8)), environ_buf: (@witx pointer u8)) -> (expected (error $errno))

Operands

NameDescription
environWASI parameter `environ` of type `(@witx pointer (@witx pointer u8))`
environ_bufWASI parameter `environ_buf` of type `(@witx pointer u8)`
errorWASI result `error`: `(expected (error $errno))`