-
Notifications
You must be signed in to change notification settings - Fork 289
Open
Description
Looking at https://github.com/WebAssembly/WASI/blob/master/phases/snapshot/docs.md
For example, the function environ_sizes_get
is shown as environ_sizes_get() -> (errno, size, size)
. This looks like it's returning three values, but if I compile a simple program to WASI this is the type of the function:
(type (;3;) (func (param i32 i32) (result i32)))
...
(import "wasi_snapshot_preview1" "environ_sizes_get" (func $__wasi_environ_sizes_get (type 3)))
So it's actually taking two args and returning one value.
I have no idea what the args are, I'm guessing they're memory locations to return values, first one is for errno
, second one is for the first size
, but I'm not sure. It'd be good to describe the syntax in the API docs.
pretzelhammer and turbolent
Metadata
Metadata
Assignees
Labels
No labels