{"id":13719852,"url":"https://github.com/nodejs/uvwasi","last_synced_at":"2025-05-16T11:03:55.594Z","repository":{"id":40299401,"uuid":"195472817","full_name":"nodejs/uvwasi","owner":"nodejs","description":"WASI syscall API built atop libuv","archived":false,"fork":false,"pushed_at":"2025-04-30T18:48:33.000Z","size":450,"stargazers_count":235,"open_issues_count":19,"forks_count":57,"subscribers_count":27,"default_branch":"main","last_synced_at":"2025-05-08T11:25:16.013Z","etag":null,"topics":["vewasiraptors"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodejs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-07-05T22:19:14.000Z","updated_at":"2025-05-06T13:29:06.000Z","dependencies_parsed_at":"2024-02-03T08:44:40.036Z","dependency_job_id":"0ca89232-3a7e-43d6-8242-4950471a84b3","html_url":"https://github.com/nodejs/uvwasi","commit_stats":{"total_commits":274,"total_committers":32,"mean_commits":8.5625,"dds":"0.33211678832116787","last_synced_commit":"6eeddbae277693bc022e59e54649ec13eed478c7"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejs%2Fuvwasi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejs%2Fuvwasi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejs%2Fuvwasi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejs%2Fuvwasi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodejs","download_url":"https://codeload.github.com/nodejs/uvwasi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518384,"owners_count":22084374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["vewasiraptors"],"created_at":"2024-08-03T01:00:56.614Z","updated_at":"2025-05-16T11:03:55.561Z","avatar_url":"https://github.com/nodejs.png","language":"C","readme":"# uvwasi\n\n**This project does not currently provide the comprehensive file system security\nproperties provided by some WASI runtimes. Full support for secure file system sandboxing\nmay or may not be implemented in future. In the mean time, do not rely on it to run untrusted code.**\n\n`uvwasi` implements the [WASI][] system call API, so that WebAssembly\nruntimes can easily implement WASI calls.  Under the hood, `uvwasi`\nleverages [libuv][] where possible for maximum portability.\n\n                                  |\n    WebAssembly code              |      WebAssembly application code\n                                  |                 |\n                                  |                 v\n                                  | WASI syscalls (inserted by compiler toolchain)\n                                  |                 |\n    ------------------------------+                 |\n                                  |                 v\n    WebAssembly runtime (Node.js) |    uvwasi (implementation of WASI)\n                                  |                 |\n                                  |                 v\n                                  |               libuv\n                                  |                 |\n                                  |                 v\n                                  |        platform-specific calls\n                                  |\n\n*(Hence uvwasi isn't for making C-programs-that-use-libuv-APIs execute on\nWASI runtimes.  That would either be a new platform added by libuv, or done\nthrough POSIX emulation by the Emscripten or wasi-sdk toolchains.)*\n\n## Building Locally\n\nTo build with [CMake](https://cmake.org/):\n\n```sh\n$ mkdir -p out/cmake ; cd out/cmake   # create build directory\n$ cmake ../.. -DBUILD_TESTING=ON      # generate project with test\n$ cmake --build .                     # build\n$ ctest -C Debug --output-on-failure  # run tests\n```\n\n## Example Usage\n\n```c\n#include \u003cstdlib.h\u003e\n#include \u003cassert.h\u003e\n#include \"uv.h\"\n#include \"uvwasi.h\"\n\nint main(void) {\n  uvwasi_t uvwasi;\n  uvwasi_options_t init_options;\n  uvwasi_errno_t err;\n\n  /* Setup the initialization options. */\n  init_options.in = 0;\n  init_options.out = 1;\n  init_options.err = 2;\n  init_options.fd_table_size = 3;\n  init_options.argc = 3;\n  init_options.argv = calloc(3, sizeof(char*));\n  init_options.argv[0] = \"--foo=bar\";\n  init_options.argv[1] = \"-baz\";\n  init_options.argv[2] = \"100\";\n  init_options.envp = NULL;\n  init_options.preopenc = 1;\n  init_options.preopens = calloc(1, sizeof(uvwasi_preopen_t));\n  init_options.preopens[0].mapped_path = \"/var\";\n  init_options.preopens[0].real_path = \".\";\n  init_options.allocator = NULL;\n\n  /* Initialize the sandbox. */\n  err = uvwasi_init(\u0026uvwasi, \u0026init_options);\n  assert(err == UVWASI_ESUCCESS);\n\n  /* TODO(cjihrig): Show an example system call or two. */\n\n  /* Clean up resources. */\n  uvwasi_destroy(\u0026uvwasi);\n  return 0;\n}\n```\n\n## API\n\nThe WASI API is versioned. This documentation is based on the WASI [preview 1][]\nsnapshot. `uvwasi` implements the WASI system call API with the following\nadditions/modifications:\n\n- Each system call takes an additional `uvwasi_t*` as its first argument. The\n  `uvwasi_t` is the sandbox under which system calls are issued. Each `uvwasi_t`\n  can have different command line arguments, environment variables, preopened\n  directories, file descriptor mappings, etc. This allows one controlling\n  process to host multiple WASI applications simultaneously.\n- Each system call returns a `uvwasi_errno_t`. This appears to be expected of\n  WASI system calls, but it is not explicitly part of the official API docs.\n  This detail is explicitly documented here.\n- Additional functions and data types are provided for interacting with WASI\n  sandboxes and the `uvwasi` library. These APIs are documented in the\n  Unofficial APIs section below.\n\n### Unofficial APIs\n\nThis section contains data types and functions for working with `uvwasi`. They\nare not part of the official WASI API, but are used to embed `uvwasi`.\n\n### \u003ca href=\"#version_major\" name=\"version_major\"\u003e\u003c/a\u003e`UVWASI_VERSION_MAJOR`\n\nThe major release version of the `uvwasi` library. `uvwasi` follows semantic\nversioning. Changes to this value represent breaking changes in the public API.\n\n### \u003ca href=\"#version_minor\" name=\"version_minor\"\u003e\u003c/a\u003e`UVWASI_VERSION_MINOR`\n\nThe minor release version of the `uvwasi` library. `uvwasi` follows semantic\nversioning. Changes to this value represent feature additions in the public API.\n\n### \u003ca href=\"#version_patch\" name=\"version_patch\"\u003e\u003c/a\u003e`UVWASI_VERSION_PATCH`\n\nThe patch release version of the `uvwasi` library. `uvwasi` follows semantic\nversioning. Changes to this value represent bug fixes in the public API.\n\n### \u003ca href=\"#version_hex\" name=\"version_hex\"\u003e\u003c/a\u003e`UVWASI_VERSION_HEX`\n\nThe major, minor, and patch versions of the `uvwasi` library encoded as a single\ninteger value.\n\n### \u003ca href=\"#version_string\" name=\"version_string\"\u003e\u003c/a\u003e`UVWASI_VERSION_STRING`\n\nThe major, minor, and patch versions of the `uvwasi` library encoded as a\nversion string.\n\n### \u003ca href=\"#version_wasi\" name=\"version_wasi\"\u003e\u003c/a\u003e`UVWASI_VERSION_WASI`\n\nThe version of the WASI API targeted by `uvwasi`.\n\n\n### \u003ca href=\"#uvwasi_t\" name=\"uvwasi_t\"\u003e\u003c/a\u003e`uvwasi_t`\n\nAn individual WASI sandbox instance.\n\n```c\ntypedef struct uvwasi_s {\n  struct uvwasi_fd_table_t fds;\n  uvwasi_size_t argc;\n  char** argv;\n  char* argv_buf;\n  uvwasi_size_t argv_buf_size;\n  uvwasi_size_t envc;\n  char** env;\n  char* env_buf;\n  uvwasi_size_t env_buf_size;\n} uvwasi_t;\n```\n\n### \u003ca href=\"#uvwasi_preopen_t\" name=\"uvwasi_preopen_t\"\u003e\u003c/a\u003e`uvwasi_preopen_t`\n\nA data structure used to map a directory path within a WASI sandbox to a\ndirectory path on the WASI host platform.\n\n```c\ntypedef struct uvwasi_preopen_s {\n  char* mapped_path;\n  char* real_path;\n} uvwasi_preopen_t;\n```\n\n### \u003ca href=\"#uvwasi_options_t\" name=\"uvwasi_options_t\"\u003e\u003c/a\u003e`uvwasi_options_t`\n\nA data structure used to pass configuration options to `uvwasi_init()`.\n\n```c\ntypedef struct uvwasi_options_s {\n  uvwasi_size_t fd_table_size;\n  uvwasi_size_t preopenc;\n  uvwasi_preopen_t* preopens;\n  uvwasi_size_t argc;\n  char** argv;\n  char** envp;\n  uvwasi_fd_t in;\n  uvwasi_fd_t out;\n  uvwasi_fd_t err;\n  const uvwasi_mem_t* allocator;\n} uvwasi_options_t;\n```\n\n### \u003ca href=\"#uvwasi_init\" name=\"uvwasi_init\"\u003e\u003c/a\u003e`uvwasi_init()`\n\nInitializes a sandbox represented by a `uvwasi_t` using the options represented\nby a `uvwasi_options_t`.\n\nInputs:\n\n- \u003ca href=\"#uvwasi_init.uvwasi\" name=\"uvwasi_init.uvwasi\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_t](#uvwasi_t) \u003cstrong\u003euvwasi\u003c/strong\u003e\u003c/code\u003e\n\n    The sandbox to initialize.\n\n- \u003ca href=\"#uvwasi_init.options\" name=\"uvwasi_init.options\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_options\\_t](#uvwasi_options_t) \u003cstrong\u003eoptions\u003c/strong\u003e\u003c/code\u003e\n\n    Configuration options used when initializing the sandbox.\n\nOutputs:\n\n- None\n\nReturns:\n\n- \u003ca href=\"#uvwasi_init.return\" name=\"uvwasi_init.return\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_errno\\_t](#errno) \u003cstrong\u003eerrno\u003c/strong\u003e\u003c/code\u003e\n\n    A WASI errno.\n\n### \u003ca href=\"#uvwasi_destroy\" name=\"uvwasi_destroy\"\u003e\u003c/a\u003e`uvwasi_destroy()`\n\nCleans up resources related to a WASI sandbox. This function notably does not\nreturn an error code.\n\nInputs:\n\n- \u003ca href=\"#uvwasi_destroy.uvwasi\" name=\"uvwasi_destroy.uvwasi\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_t](#uvwasi_t) \u003cstrong\u003euvwasi\u003c/strong\u003e\u003c/code\u003e\n\n    The sandbox to clean up.\n\nOutputs:\n\n- None\n\nReturns:\n\n- None\n\n### System Calls\n\nThis section has been adapted from the official WASI API documentation.\n\n- [`uvwasi_args_get()`](#args_get)\n- [`uvwasi_args_sizes_get()`](#args_sizes_get)\n- [`uvwasi_clock_res_get()`](#clock_res_get)\n- [`uvwasi_clock_time_get()`](#clock_time_get)\n- [`uvwasi_environ_get()`](#environ_get)\n- [`uvwasi_environ_sizes_get()`](#environ_sizes_get)\n- [`uvwasi_fd_advise()`](#fd_advise)\n- [`uvwasi_fd_allocate()`](#fd_allocate)\n- [`uvwasi_fd_close()`](#fd_close)\n- [`uvwasi_fd_datasync()`](#fd_datasync)\n- [`uvwasi_fd_fdstat_get()`](#fd_fdstat_get)\n- [`uvwasi_fd_fdstat_set_flags()`](#fd_fdstat_set_flags)\n- [`uvwasi_fd_fdstat_set_rights()`](#fd_fdstat_set_rights)\n- [`uvwasi_fd_filestat_get()`](#fd_filestat_get)\n- [`uvwasi_fd_filestat_set_size()`](#fd_filestat_set_size)\n- [`uvwasi_fd_filestat_set_times()`](#fd_filestat_set_times)\n- [`uvwasi_fd_pread()`](#fd_pread)\n- [`uvwasi_fd_prestat_get()`](#fd_prestat_get)\n- [`uvwasi_fd_prestat_dir_name()`](#fd_prestat_dir_name)\n- [`uvwasi_fd_pwrite()`](#fd_pwrite)\n- [`uvwasi_fd_read()`](#fd_read)\n- [`uvwasi_fd_readdir()`](#fd_readdir)\n- [`uvwasi_fd_renumber()`](#fd_renumber)\n- [`uvwasi_fd_seek()`](#fd_seek)\n- [`uvwasi_fd_sync()`](#fd_sync)\n- [`uvwasi_fd_tell()`](#fd_tell)\n- [`uvwasi_fd_write()`](#fd_write)\n- [`uvwasi_path_create_directory()`](#path_create_directory)\n- [`uvwasi_path_filestat_get()`](#path_filestat_get)\n- [`uvwasi_path_filestat_set_times()`](#path_filestat_set_times)\n- [`uvwasi_path_link()`](#path_link)\n- [`uvwasi_path_open()`](#path_open)\n- [`uvwasi_path_readlink()`](#path_readlink)\n- [`uvwasi_path_remove_directory()`](#path_remove_directory)\n- [`uvwasi_path_rename()`](#path_rename)\n- [`uvwasi_path_symlink()`](#path_symlink)\n- [`uvwasi_path_unlink_file()`](#path_unlink_file)\n- [`uvwasi_poll_oneoff()`](#poll_oneoff)\n- [`uvwasi_proc_exit()`](#proc_exit)\n- [`uvwasi_proc_raise()`](#proc_raise)\n- [`uvwasi_random_get()`](#random_get)\n- [`uvwasi_sched_yield()`](#sched_yield)\n- [`uvwasi_sock_recv()`](#sock_recv)\n- [`uvwasi_sock_send()`](#sock_send)\n- [`uvwasi_sock_shutdown()`](#sock_shutdown)\n\n### \u003ca href=\"#args_get\" name=\"args_get\"\u003e\u003c/a\u003e`uvwasi_args_get()`\n\nRead command-line argument data.\n\nThe sizes of the buffers should match that returned by [`uvwasi_args_sizes_get()`](#args_sizes_get).\n\nInputs:\n\n- \u003ca href=\"#args_get.argv\" name=\"args_get.argv\"\u003e\u003c/a\u003e\u003ccode\u003echar \\*\\*\u003cstrong\u003eargv\u003c/strong\u003e\u003c/code\u003e\n\n    A pointer to a buffer to write the argument pointers.\n\n- \u003ca href=\"#args_get.argv_buf\" name=\"args_get.argv_buf\"\u003e\u003c/a\u003e\u003ccode\u003echar \\*\u003cstrong\u003eargv\\_buf\u003c/strong\u003e\u003c/code\u003e\n\n    A pointer to a buffer to write the argument string data.\n\n### \u003ca href=\"#args_sizes_get\" name=\"args_sizes_get\"\u003e\u003c/a\u003e`uvwasi_args_sizes_get()`\n\nReturn command-line argument data sizes.\n\nOutputs:\n\n- \u003ca href=\"#args_sizes_get.argc\" name=\"args_sizes_get.argc\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \\*\u003cstrong\u003eargc\u003c/strong\u003e\u003c/code\u003e\n\n    The number of arguments.\n\n- \u003ca href=\"#args_sizes_get.argv_buf_size\" name=\"args_sizes_get.argv_buf_size\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \\*\u003cstrong\u003eargv\\_buf\\_size\u003c/strong\u003e\u003c/code\u003e\n\n    The size of the argument string data.\n\n### \u003ca href=\"#clock_res_get\" name=\"clock_res_get\"\u003e\u003c/a\u003e`uvwasi_clock_res_get()`\n\nReturn the resolution of a clock.\n\nImplementations are required to provide a non-zero value for supported clocks.\nFor unsupported clocks, return [`UVWASI_EINVAL`](#errno.inval).\n\nNote: This is similar to `clock_getres` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#clock_res_get.clock_id\" name=\"clock_res_get.clock_id\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_clockid\\_t](#clockid) \u003cstrong\u003eclock\\_id\u003c/strong\u003e\u003c/code\u003e\n\n    The clock for which to return the resolution.\n\nOutputs:\n\n- \u003ca href=\"#clock_res_get.resolution\" name=\"clock_res_get.resolution\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_timestamp\\_t](#timestamp) \u003cstrong\u003eresolution\u003c/strong\u003e\u003c/code\u003e\n\n    The resolution of the clock.\n\n### \u003ca href=\"#clock_time_get\" name=\"clock_time_get\"\u003e\u003c/a\u003e`uvwasi_clock_time_get()`\n\nReturn the time value of a clock.\n\nNote: This is similar to `clock_gettime` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#clock_time_get.clock_id\" name=\"clock_time_get.clock_id\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_clockid\\_t](#clockid) \u003cstrong\u003eclock\\_id\u003c/strong\u003e\u003c/code\u003e\n\n    The clock for which to return the time.\n\n- \u003ca href=\"#clock_time_get.precision\" name=\"clock_time_get.precision\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_timestamp\\_t](#timestamp) \u003cstrong\u003eprecision\u003c/strong\u003e\u003c/code\u003e\n\n    The maximum lag (exclusive) that the returned\n    time value may have, compared to its actual\n    value.\n\nOutputs:\n\n- \u003ca href=\"#clock_time_get.time\" name=\"clock_time_get.time\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_timestamp\\_t](#timestamp) \u003cstrong\u003etime\u003c/strong\u003e\u003c/code\u003e\n\n    The time value of the clock.\n\n### \u003ca href=\"#environ_get\" name=\"environ_get\"\u003e\u003c/a\u003e`uvwasi_environ_get()`\n\nRead environment variable data.\n\nThe sizes of the buffers should match that returned by [`uvwasi_environ_sizes_get()`](#environ_sizes_get).\n\nInputs:\n\n- \u003ca href=\"#environ_get.environ\" name=\"environ_get.environ\"\u003e\u003c/a\u003e\u003ccode\u003echar \\*\\*\u003cstrong\u003eenviron\u003c/strong\u003e\u003c/code\u003e\n\n    A pointer to a buffer to write the environment variable pointers.\n\n- \u003ca href=\"#environ_get.environ_buf\" name=\"environ_get.environ_buf\"\u003e\u003c/a\u003e\u003ccode\u003echar \\*\u003cstrong\u003eenviron\\_buf\u003c/strong\u003e\u003c/code\u003e\n\n    A pointer to a buffer to write the environment variable string data.\n\n### \u003ca href=\"#environ_sizes_get\" name=\"environ_sizes_get\"\u003e\u003c/a\u003e`uvwasi_environ_sizes_get()`\n\nReturn command-line argument data sizes.\n\nOutputs:\n\n- \u003ca href=\"#environ_sizes_get.environ_count\" name=\"environ_sizes_get.environ_count\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \\*\u003cstrong\u003eenviron\\_count\u003c/strong\u003e\u003c/code\u003e\n\n    The number of environment variables.\n\n- \u003ca href=\"#environ_sizes_get.environ_buf_size\" name=\"environ_sizes_get.environ_buf_size\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \\*\u003cstrong\u003eenviron\\_buf\\_size\u003c/strong\u003e\u003c/code\u003e\n\n    The size of the environment variable string data.\n\n### \u003ca href=\"#fd_advise\" name=\"fd_advise\"\u003e\u003c/a\u003e`uvwasi_fd_advise()`\n\nProvide file advisory information on a file descriptor.\n\nNote: This is similar to `posix_fadvise` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#fd_advise.fd\" name=\"fd_advise.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor for the file for which to provide file advisory information.\n\n- \u003ca href=\"#fd_advise.offset\" name=\"fd_advise.offset\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_filesize\\_t](#filesize) \u003cstrong\u003eoffset\u003c/strong\u003e\u003c/code\u003e\n\n    The offset within the file to which the advisory applies.\n\n- \u003ca href=\"#fd_advise.len\" name=\"fd_advise.len\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_filesize\\_t](#filesize) \u003cstrong\u003elen\u003c/strong\u003e\u003c/code\u003e\n\n    The length of the region to which the advisory applies.\n\n- \u003ca href=\"#fd_advise.advice\" name=\"fd_advise.advice\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_advice\\_t](#advice) \u003cstrong\u003eadvice\u003c/strong\u003e\u003c/code\u003e\n\n    The advice.\n\n### \u003ca href=\"#fd_allocate\" name=\"fd_allocate\"\u003e\u003c/a\u003e`uvwasi_fd_allocate()`\n\nForce the allocation of space in a file.\n\nNote: This is similar to `posix_fallocate` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#fd_allocate.fd\" name=\"fd_allocate.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor for the file in which to allocate space.\n\n- \u003ca href=\"#fd_allocate.offset\" name=\"fd_allocate.offset\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_filesize\\_t](#filesize) \u003cstrong\u003eoffset\u003c/strong\u003e\u003c/code\u003e\n\n    The offset at which to start the allocation.\n\n- \u003ca href=\"#fd_allocate.len\" name=\"fd_allocate.len\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_filesize\\_t](#filesize) \u003cstrong\u003elen\u003c/strong\u003e\u003c/code\u003e\n\n    The length of the area that is allocated.\n\n### \u003ca href=\"#fd_close\" name=\"fd_close\"\u003e\u003c/a\u003e`uvwasi_fd_close()`\n\nClose a file descriptor.\n\nNote: This is similar to `close` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#fd_close.fd\" name=\"fd_close.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor to close.\n\n### \u003ca href=\"#fd_datasync\" name=\"fd_datasync\"\u003e\u003c/a\u003e`uvwasi_fd_datasync()`\n\nSynchronize the data of a file to disk.\n\nNote: This is similar to `fdatasync` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#fd_datasync.fd\" name=\"fd_datasync.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor of the file to synchronize to disk.\n\n### \u003ca href=\"#fd_fdstat_get\" name=\"fd_fdstat_get\"\u003e\u003c/a\u003e`uvwasi_fd_fdstat_get()`\n\nGet the attributes of a file descriptor.\n\nNote: This returns similar flags to `fsync(fd, F_GETFL)` in POSIX, as well\nas additional fields.\n\nInputs:\n\n- \u003ca href=\"#fd_fdstat_get.fd\" name=\"fd_fdstat_get.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor to inspect.\n\n- \u003ca href=\"#fd_fdstat_get.buf\" name=\"fd_fdstat_get.buf\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fdstat\\_t](#fdstat) \\*\u003cstrong\u003ebuf\u003c/strong\u003e\u003c/code\u003e\n\n    The buffer where the file descriptor's attributes are stored.\n\n### \u003ca href=\"#fd_fdstat_set_flags\" name=\"fd_fdstat_set_flags\"\u003e\u003c/a\u003e`uvwasi_fd_fdstat_set_flags()`\n\nAdjust the flags associated with a file descriptor.\n\nNote: This is similar to `fcntl(fd, F_SETFL, flags)` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#fd_fdstat_set_flags.fd\" name=\"fd_fdstat_set_flags.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor to operate on.\n\n- \u003ca href=\"#fd_fdstat_set_flags.flags\" name=\"fd_fdstat_set_flags.flags\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fdflags\\_t](#fdflags) \u003cstrong\u003eflags\u003c/strong\u003e\u003c/code\u003e\n\n    The desired values of the file descriptor\n    flags.\n\n### \u003ca href=\"#fd_fdstat_set_rights\" name=\"fd_fdstat_set_rights\"\u003e\u003c/a\u003e`uvwasi_fd_fdstat_set_rights()`\n\nAdjust the rights associated with a file descriptor.\n\nThis can only be used to remove rights, and returns\n[`UVWASI_ENOTCAPABLE`](#errno.notcapable) if called in a way that would attempt\nto add rights.\n\nInputs:\n\n- \u003ca href=\"#fd_fdstat_set_rights.fd\" name=\"fd_fdstat_set_rights.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor to operate on.\n\n- \u003ca href=\"#fd_fdstat_set_rights.fs_rights_base\" name=\"fd_fdstat_set_rights.fs_rights_base\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_rights\\_t](#rights) \u003cstrong\u003efs\\_rights\\_base\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#fd_fdstat_set_rights.fs_rights_inheriting\" name=\"fd_fdstat_set_rights.fs_rights_inheriting\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_rights\\_t](#rights) \u003cstrong\u003efs\\_rights\\_inheriting\u003c/strong\u003e\u003c/code\u003e\n\n    The desired rights of the file descriptor.\n\n### \u003ca href=\"#fd_filestat_get\" name=\"fd_filestat_get\"\u003e\u003c/a\u003e`uvwasi_fd_filestat_get()`\n\nReturn the attributes of an open file.\n\nInputs:\n\n- \u003ca href=\"#fd_filestat_get.fd\" name=\"fd_filestat_get.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor to inspect.\n\n- \u003ca href=\"#fd_filestat_get.buf\" name=\"fd_filestat_get.buf\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_filestat\\_t](#filestat) \\*\u003cstrong\u003ebuf\u003c/strong\u003e\u003c/code\u003e\n\n    The buffer where the file's attributes are\n    stored.\n\n### \u003ca href=\"#fd_filestat_set_size\" name=\"fd_filestat_set_size\"\u003e\u003c/a\u003e`uvwasi_fd_filestat_set_size()`\n\nAdjust the size of an open file. If this increases the file's size, the extra\nbytes are filled with zeros.\n\nNote: This is similar to `ftruncate` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#fd_filestat_set_size.fd\" name=\"fd_filestat_set_size.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    A file descriptor for the file to adjust.\n\n- \u003ca href=\"#fd_filestat_set_size.st_size\" name=\"fd_filestat_set_size.st_size\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_filesize\\_t](#filesize) \u003cstrong\u003est\\_size\u003c/strong\u003e\u003c/code\u003e\n\n    The desired file size.\n\n### \u003ca href=\"#fd_filestat_set_times\" name=\"fd_filestat_set_times\"\u003e\u003c/a\u003e`uvwasi_fd_filestat_set_times()`\n\nAdjust the timestamps of an open file or directory.\n\nNote: This is similar to `futimens` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#fd_filestat_set_times.fd\" name=\"fd_filestat_set_times.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor to operate on.\n\n- \u003ca href=\"#fd_filestat_set_times.st_atim\" name=\"fd_filestat_set_times.st_atim\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_timestamp\\_t](#timestamp) \u003cstrong\u003est\\_atim\u003c/strong\u003e\u003c/code\u003e\n\n    The desired values of the data access timestamp.\n\n- \u003ca href=\"#fd_filestat_set_times.st_mtim\" name=\"fd_filestat_set_times.st_mtim\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_timestamp\\_t](#timestamp) \u003cstrong\u003est\\_mtim\u003c/strong\u003e\u003c/code\u003e\n\n    The desired values of the data modification timestamp.\n\n- \u003ca href=\"#fd_filestat_set_times.fst_flags\" name=\"fd_filestat_set_times.fst_flags\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fstflags\\_t](#fstflags) \u003cstrong\u003efst\\_flags\u003c/strong\u003e\u003c/code\u003e\n\n    A bitmask indicating which timestamps to adjust.\n\n### \u003ca href=\"#fd_pread\" name=\"fd_pread\"\u003e\u003c/a\u003e`uvwasi_fd_pread()`\n\nRead from a file descriptor, without using and updating the\nfile descriptor's offset.\n\nNote: This is similar to `preadv` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#fd_pread.fd\" name=\"fd_pread.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor from which to read data.\n\n- \u003ca href=\"#fd_pread.iovs\" name=\"fd_pread.iovs\"\u003e\u003c/a\u003e\u003ccode\u003econst [\\_\\_wasi\\_iovec\\_t](#iovec) \\*\u003cstrong\u003eiovs\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#fd_pread.iovs_len\" name=\"fd_pread.iovs_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003eiovs\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    List of scatter/gather vectors in which to store data.\n\n- \u003ca href=\"#fd_pread.offset\" name=\"fd_pread.offset\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_filesize\\_t](#filesize) \u003cstrong\u003eoffset\u003c/strong\u003e\u003c/code\u003e\n\n    The offset within the file at which to read.\n\nOutputs:\n\n- \u003ca href=\"#fd_pread.nread\" name=\"fd_pread.nread\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003enread\u003c/strong\u003e\u003c/code\u003e\n\n    The number of bytes read.\n\n### \u003ca href=\"#fd_prestat_get\" name=\"fd_prestat_get\"\u003e\u003c/a\u003e`uvwasi_fd_prestat_get()`\n\nReturn a description of the given preopened file descriptor.\n\nInputs:\n\n- \u003ca href=\"#fd_prestat_get.fd\" name=\"fd_prestat_get.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor about which to retrieve information.\n\n- \u003ca href=\"#fd_prestat_get.buf\" name=\"fd_prestat_get.buf\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_prestat\\_t](#prestat) \\*\u003cstrong\u003ebuf\u003c/strong\u003e\u003c/code\u003e\n\n    The buffer where the description is stored.\n\n### \u003ca href=\"#fd_prestat_dir_name\" name=\"fd_prestat_dir_name\"\u003e\u003c/a\u003e`uvwasi_fd_prestat_dir_name()`\n\nReturn a description of the given preopened file descriptor.\n\nInputs:\n\n- \u003ca href=\"#fd_prestat_dir_name.fd\" name=\"fd_prestat_dir_name.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor about which to retrieve information.\n\n- \u003ca href=\"#fd_prestat_dir_name.path\" name=\"fd_prestat_dir_name.path\"\u003e\u003c/a\u003e\u003ccode\u003econst char \\*\u003cstrong\u003epath\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#fd_prestat_dir_name.path_len\" name=\"fd_prestat_dir_name.path_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003epath\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    A buffer into which to write the preopened directory name.\n\n### \u003ca href=\"#fd_pwrite\" name=\"fd_pwrite\"\u003e\u003c/a\u003e`uvwasi_fd_pwrite()`\n\nWrite to a file descriptor, without using and updating the\nfile descriptor's offset.\n\nNote: This is similar to `pwritev` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#fd_pwrite.fd\" name=\"fd_pwrite.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor to which to write data.\n\n- \u003ca href=\"#fd_pwrite.iovs\" name=\"fd_pwrite.iovs\"\u003e\u003c/a\u003e\u003ccode\u003econst [\\_\\_wasi\\_ciovec\\_t](#ciovec) \\*\u003cstrong\u003eiovs\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#fd_pwrite.iovs_len\" name=\"fd_pwrite.iovs_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003eiovs\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    List of scatter/gather vectors from which to retrieve data.\n\n- \u003ca href=\"#fd_pwrite.offset\" name=\"fd_pwrite.offset\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_filesize\\_t](#filesize) \u003cstrong\u003eoffset\u003c/strong\u003e\u003c/code\u003e\n\n    The offset within the file at which to write.\n\nOutputs:\n\n- \u003ca href=\"#fd_pwrite.nwritten\" name=\"fd_pwrite.nwritten\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003enwritten\u003c/strong\u003e\u003c/code\u003e\n\n    The number of bytes written.\n\n### \u003ca href=\"#fd_read\" name=\"fd_read\"\u003e\u003c/a\u003e`uvwasi_fd_read()`\n\nRead from a file descriptor.\n\nNote: This is similar to `readv` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#fd_read.fd\" name=\"fd_read.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor from which to read data.\n\n- \u003ca href=\"#fd_read.iovs\" name=\"fd_read.iovs\"\u003e\u003c/a\u003e\u003ccode\u003econst [\\_\\_wasi\\_iovec\\_t](#iovec) \\*\u003cstrong\u003eiovs\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#fd_read.iovs_len\" name=\"fd_read.iovs_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003eiovs\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    List of scatter/gather vectors to which to store data.\n\nOutputs:\n\n- \u003ca href=\"#fd_read.nread\" name=\"fd_read.nread\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003enread\u003c/strong\u003e\u003c/code\u003e\n\n    The number of bytes read.\n\n### \u003ca href=\"#fd_readdir\" name=\"fd_readdir\"\u003e\u003c/a\u003e`uvwasi_fd_readdir()`\n\nRead directory entries from a directory.\n\nWhen successful, the contents of the output buffer consist of\na sequence of directory entries. Each directory entry consists\nof a [`uvwasi_dirent_t`](#dirent) object, followed by [`uvwasi_dirent_t::d_namlen`](#dirent.d_namlen) bytes\nholding the name of the directory entry.\n\nThis function fills the output buffer as much as possible,\npotentially truncating the last directory entry. This allows\nthe caller to grow its read buffer size in case it's too small\nto fit a single large directory entry, or skip the oversized\ndirectory entry.\n\nInputs:\n\n- \u003ca href=\"#fd_readdir.fd\" name=\"fd_readdir.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The directory from which to read the directory\n    entries.\n\n- \u003ca href=\"#fd_readdir.buf\" name=\"fd_readdir.buf\"\u003e\u003c/a\u003e\u003ccode\u003evoid \\*\u003cstrong\u003ebuf\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#fd_readdir.buf_len\" name=\"fd_readdir.buf_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003ebuf\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The buffer where directory entries are stored.\n\n- \u003ca href=\"#fd_readdir.cookie\" name=\"fd_readdir.cookie\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_dircookie\\_t](#dircookie) \u003cstrong\u003ecookie\u003c/strong\u003e\u003c/code\u003e\n\n    The location within the directory to start\n    reading.\n\nOutputs:\n\n- \u003ca href=\"#fd_readdir.bufused\" name=\"fd_readdir.bufused\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003ebufused\u003c/strong\u003e\u003c/code\u003e\n\n    The number of bytes stored in the read buffer.\n    If less than the size of the read buffer, the\n    end of the directory has been reached.\n\n### \u003ca href=\"#fd_renumber\" name=\"fd_renumber\"\u003e\u003c/a\u003e`uvwasi_fd_renumber()`\n\nAtomically replace a file descriptor by renumbering another\nfile descriptor.\n\nDue to the strong focus on thread safety, this environment\ndoes not provide a mechanism to duplicate or renumber a file\ndescriptor to an arbitrary number, like dup2(). This would be\nprone to race conditions, as an actual file descriptor with the\nsame number could be allocated by a different thread at the same\ntime.\n\nThis function provides a way to atomically renumber file\ndescriptors, which would disappear if dup2() were to be\nremoved entirely.\n\nInputs:\n\n- \u003ca href=\"#fd_renumber.from\" name=\"fd_renumber.from\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efrom\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor to renumber.\n\n- \u003ca href=\"#fd_renumber.to\" name=\"fd_renumber.to\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003eto\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor to overwrite.\n\n### \u003ca href=\"#fd_seek\" name=\"fd_seek\"\u003e\u003c/a\u003e`uvwasi_fd_seek()`\n\nMove the offset of a file descriptor.\n\nNote: This is similar to `lseek` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#fd_seek.fd\" name=\"fd_seek.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor to operate on.\n\n- \u003ca href=\"#fd_seek.offset\" name=\"fd_seek.offset\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_filedelta\\_t](#filedelta) \u003cstrong\u003eoffset\u003c/strong\u003e\u003c/code\u003e\n\n    The number of bytes to move.\n\n- \u003ca href=\"#fd_seek.whence\" name=\"fd_seek.whence\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_whence\\_t](#whence) \u003cstrong\u003ewhence\u003c/strong\u003e\u003c/code\u003e\n\n    The base from which the offset is relative.\n\nOutputs:\n\n- \u003ca href=\"#fd_seek.newoffset\" name=\"fd_seek.newoffset\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_filesize\\_t](#filesize) \u003cstrong\u003enewoffset\u003c/strong\u003e\u003c/code\u003e\n\n    The new offset of the file descriptor,\n    relative to the start of the file.\n\n### \u003ca href=\"#fd_sync\" name=\"fd_sync\"\u003e\u003c/a\u003e`uvwasi_fd_sync()`\n\nSynchronize the data and metadata of a file to disk.\n\nNote: This is similar to `fsync` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#fd_sync.fd\" name=\"fd_sync.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor of the file containing the data\n    and metadata to synchronize to disk.\n\n### \u003ca href=\"#fd_tell\" name=\"fd_tell\"\u003e\u003c/a\u003e`uvwasi_fd_tell()`\n\nReturn the current offset of a file descriptor.\n\nNote: This is similar to `lseek(fd, 0, SEEK_CUR)` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#fd_tell.fd\" name=\"fd_tell.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor to inspect.\n\nOutputs:\n\n- \u003ca href=\"#fd_tell.offset\" name=\"fd_tell.offset\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_filesize\\_t](#filesize) \u003cstrong\u003eoffset\u003c/strong\u003e\u003c/code\u003e\n\n    The current offset of the file descriptor, relative to the start of the file.\n\n### \u003ca href=\"#fd_write\" name=\"fd_write\"\u003e\u003c/a\u003e`uvwasi_fd_write()`\n\nWrite to a file descriptor.\n\nNote: This is similar to `writev` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#fd_write.fd\" name=\"fd_write.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor to which to write data.\n\n- \u003ca href=\"#fd_write.iovs\" name=\"fd_write.iovs\"\u003e\u003c/a\u003e\u003ccode\u003econst [\\_\\_wasi\\_ciovec\\_t](#ciovec) \\*\u003cstrong\u003eiovs\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#fd_write.iovs_len\" name=\"fd_write.iovs_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003eiovs\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    List of scatter/gather vectors from which to retrieve data.\n\nOutputs:\n\n- \u003ca href=\"#fd_write.nwritten\" name=\"fd_write.nwritten\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003enwritten\u003c/strong\u003e\u003c/code\u003e\n\n    The number of bytes written.\n\n### \u003ca href=\"#path_create_directory\" name=\"path_create_directory\"\u003e\u003c/a\u003e`uvwasi_path_create_directory()`\n\nCreate a directory.\n\nNote: This is similar to `mkdirat` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#path_create_directory.fd\" name=\"path_create_directory.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The working directory at which the resolution of the path starts.\n\n- \u003ca href=\"#path_create_directory.path\" name=\"path_create_directory.path\"\u003e\u003c/a\u003e\u003ccode\u003econst char \\*\u003cstrong\u003epath\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#path_create_directory.path_len\" name=\"path_create_directory.path_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003epath\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The path at which to create the directory.\n\n### \u003ca href=\"#path_filestat_get\" name=\"path_filestat_get\"\u003e\u003c/a\u003e`uvwasi_path_filestat_get()`\n\nReturn the attributes of a file or directory.\n\nNote: This is similar to `stat` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#path_filestat_get.fd\" name=\"path_filestat_get.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The working directory at which the resolution of the path starts.\n\n- \u003ca href=\"#path_filestat_get.flags\" name=\"path_filestat_get.flags\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_lookupflags\\_t](#lookupflags) \u003cstrong\u003eflags\u003c/strong\u003e\u003c/code\u003e\n\n    Flags determining the method of how the path is resolved.\n\n- \u003ca href=\"#path_filestat_get.path\" name=\"path_filestat_get.path\"\u003e\u003c/a\u003e\u003ccode\u003econst char \\*\u003cstrong\u003epath\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#path_filestat_get.path_len\" name=\"path_filestat_get.path_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003epath\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The path of the file or directory to inspect.\n\n- \u003ca href=\"#path_filestat_get.buf\" name=\"path_filestat_get.buf\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_filestat\\_t](#filestat) \\*\u003cstrong\u003ebuf\u003c/strong\u003e\u003c/code\u003e\n\n    The buffer where the file's attributes are\n    stored.\n\n### \u003ca href=\"#path_filestat_set_times\" name=\"path_filestat_set_times\"\u003e\u003c/a\u003e`uvwasi_path_filestat_set_times()`\n\nAdjust the timestamps of a file or directory.\n\nNote: This is similar to `utimensat` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#path_filestat_set_times.fd\" name=\"path_filestat_set_times.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The working directory at which the resolution of the path starts.\n\n- \u003ca href=\"#path_filestat_set_times.flags\" name=\"path_filestat_set_times.flags\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_lookupflags\\_t](#lookupflags) \u003cstrong\u003eflags\u003c/strong\u003e\u003c/code\u003e\n\n    Flags determining the method of how the path is resolved.\n\n- \u003ca href=\"#path_filestat_set_times.path\" name=\"path_filestat_set_times.path\"\u003e\u003c/a\u003e\u003ccode\u003econst char \\*\u003cstrong\u003epath\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#path_filestat_set_times.path_len\" name=\"path_filestat_set_times.path_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003epath\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The path of the file or directory to operate on.\n\n- \u003ca href=\"#path_filestat_set_times.st_atim\" name=\"path_filestat_set_times.st_atim\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_timestamp\\_t](#timestamp) \u003cstrong\u003est\\_atim\u003c/strong\u003e\u003c/code\u003e\n\n    The desired values of the data access timestamp.\n\n- \u003ca href=\"#path_filestat_set_times.st_mtim\" name=\"path_filestat_set_times.st_mtim\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_timestamp\\_t](#timestamp) \u003cstrong\u003est\\_mtim\u003c/strong\u003e\u003c/code\u003e\n\n    The desired values of the data modification timestamp.\n\n- \u003ca href=\"#path_filestat_set_times.fst_flags\" name=\"path_filestat_set_times.fst_flags\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fstflags\\_t](#fstflags) \u003cstrong\u003efst\\_flags\u003c/strong\u003e\u003c/code\u003e\n\n    A bitmask indicating which timestamps to adjust.\n\n### \u003ca href=\"#path_link\" name=\"path_link\"\u003e\u003c/a\u003e`uvwasi_path_link()`\n\nCreate a hard link.\n\nNote: This is similar to `linkat` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#path_link.old_fd\" name=\"path_link.old_fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003eold\\_fd\u003c/strong\u003e\u003c/code\u003e\n\n    The working directory at which the resolution of the old path starts.\n\n- \u003ca href=\"#path_link.old_flags\" name=\"path_link.old_flags\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_lookupflags\\_t](#lookupflags) \u003cstrong\u003eold\\_flags\u003c/strong\u003e\u003c/code\u003e\n\n    Flags determining the method of how the path is resolved.\n\n- \u003ca href=\"#path_link.old_path\" name=\"path_link.old_path\"\u003e\u003c/a\u003e\u003ccode\u003econst char \\*\u003cstrong\u003eold\\_path\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#path_link.old_path_len\" name=\"path_link.old_path_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003eold\\_path\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The source path from which to link.\n\n- \u003ca href=\"#path_link.new_fd\" name=\"path_link.new_fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003enew\\_fd\u003c/strong\u003e\u003c/code\u003e\n\n    The working directory at which the resolution of the new path starts.\n\n- \u003ca href=\"#path_link.new_path\" name=\"path_link.new_path\"\u003e\u003c/a\u003e\u003ccode\u003econst char \\*\u003cstrong\u003enew\\_path\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#path_link.new_path_len\" name=\"path_link.new_path_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003enew\\_path\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The destination path at which to create the hard link.\n\n### \u003ca href=\"#path_open\" name=\"path_open\"\u003e\u003c/a\u003e`uvwasi_path_open()`\n\nOpen a file or directory.\n\nThe returned file descriptor is not guaranteed to be the lowest-numbered\nfile descriptor not currently open; it is randomized to prevent\napplications from depending on making assumptions about indexes, since\nthis is error-prone in multi-threaded contexts. The returned file\ndescriptor is guaranteed to be less than 2\u003csup\u003e31\u003c/sup\u003e.\n\nNote: This is similar to `openat` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#path_open.dirfd\" name=\"path_open.dirfd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003edirfd\u003c/strong\u003e\u003c/code\u003e\n\n    The working directory at which the resolution of the path starts.\n\n- \u003ca href=\"#path_open.dirflags\" name=\"path_open.dirflags\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_lookupflags\\_t](#lookupflags) \u003cstrong\u003edirflags\u003c/strong\u003e\u003c/code\u003e\n\n    Flags determining the method of how the path is resolved.\n\n- \u003ca href=\"#path_open.path\" name=\"path_open.path\"\u003e\u003c/a\u003e\u003ccode\u003econst char \\*\u003cstrong\u003epath\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#path_open.path_len\" name=\"path_open.path_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003epath\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The relative path of the file or directory to open, relative to\n    the [`dirfd`](#path_open.dirfd) directory.\n\n- \u003ca href=\"#path_open.o_flags\" name=\"path_open.o_flags\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_oflags\\_t](#oflags) \u003cstrong\u003eo_flags\u003c/strong\u003e\u003c/code\u003e\n\n    The method by which to open the file.\n\n- \u003ca href=\"#path_open.fs_rights_base\" name=\"path_open.fs_rights_base\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_rights\\_t](#rights) \u003cstrong\u003efs\\_rights\\_base\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#path_open.fs_rights_inheriting\" name=\"path_open.fs_rights_inheriting\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_rights\\_t](#rights) \u003cstrong\u003efs\\_rights\\_inheriting\u003c/strong\u003e\u003c/code\u003e\n\n    The initial rights of the newly created file descriptor. The\n    implementation is allowed to return a file descriptor with fewer\n    rights than specified, if and only if those rights do not apply\n    to the type of file being opened.\n\n    The *base* rights are rights that will apply to operations using\n    the file descriptor itself, while the *inheriting* rights are\n    rights that apply to file descriptors derived from it.\n\n- \u003ca href=\"#path_open.fs_flags\" name=\"path_open.fs_flags\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fdflags\\_t](#fdflags) \u003cstrong\u003efs\\_flags\u003c/strong\u003e\u003c/code\u003e\n\n    The initial flags of the file descriptor.\n\nOutputs:\n\n- \u003ca href=\"#path_open.fd\" name=\"path_open.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The file descriptor of the file that has been\n    opened.\n\n### \u003ca href=\"#path_readlink\" name=\"path_readlink\"\u003e\u003c/a\u003e`uvwasi_path_readlink()`\n\nRead the contents of a symbolic link.\n\nNote: This is similar to `readlinkat` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#path_readlink.fd\" name=\"path_readlink.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The working directory at which the resolution of the path starts.\n\n- \u003ca href=\"#path_readlink.path\" name=\"path_readlink.path\"\u003e\u003c/a\u003e\u003ccode\u003econst char \\*\u003cstrong\u003epath\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#path_readlink.path_len\" name=\"path_readlink.path_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003epath\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The path of the symbolic link from which to read.\n\n- \u003ca href=\"#path_readlink.buf\" name=\"path_readlink.buf\"\u003e\u003c/a\u003e\u003ccode\u003echar \\*\u003cstrong\u003ebuf\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#path_readlink.buf_len\" name=\"path_readlink.buf_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003ebuf\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The buffer to which to write the contents of the symbolic link.\n\nOutputs:\n\n- \u003ca href=\"#path_readlink.bufused\" name=\"path_readlink.bufused\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003ebufused\u003c/strong\u003e\u003c/code\u003e\n\n    The number of bytes placed in the buffer.\n\n### \u003ca href=\"#path_remove_directory\" name=\"path_remove_directory\"\u003e\u003c/a\u003e`uvwasi_path_remove_directory()`\n\nRemove a directory.\n\nReturn [`UVWASI_ENOTEMPTY`](#errno.notempty) if the directory is not empty.\n\nNote: This is similar to `unlinkat(fd, path, AT_REMOVEDIR)` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#path_remove_directory.fd\" name=\"path_remove_directory.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The working directory at which the resolution of the path starts.\n\n- \u003ca href=\"#path_remove_directory.path\" name=\"path_remove_directory.path\"\u003e\u003c/a\u003e\u003ccode\u003econst char \\*\u003cstrong\u003epath\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#path_remove_directory.path_len\" name=\"path_remove_directory.path_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003epath\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The path to a directory to remove.\n\n### \u003ca href=\"#path_rename\" name=\"path_rename\"\u003e\u003c/a\u003e`uvwasi_path_rename()`\n\nRename a file or directory.\n\nNote: This is similar to `renameat` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#path_rename.old_fd\" name=\"path_rename.old_fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003eold\\_fd\u003c/strong\u003e\u003c/code\u003e\n\n    The working directory at which the resolution of the old path starts.\n\n- \u003ca href=\"#path_rename.old_path\" name=\"path_rename.old_path\"\u003e\u003c/a\u003e\u003ccode\u003econst char \\*\u003cstrong\u003eold\\_path\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#path_rename.old_path_len\" name=\"path_rename.old_path_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003eold\\_path\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The source path of the file or directory to rename.\n\n- \u003ca href=\"#path_rename.new_fd\" name=\"path_rename.new_fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003enew\\_fd\u003c/strong\u003e\u003c/code\u003e\n\n    The working directory at which the resolution of the new path starts.\n\n- \u003ca href=\"#path_rename.new_path\" name=\"path_rename.new_path\"\u003e\u003c/a\u003e\u003ccode\u003econst char \\*\u003cstrong\u003enew\\_path\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#path_rename.new_path_len\" name=\"path_rename.new_path_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003enew\\_path\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The destination path to which to rename the file or directory.\n\n### \u003ca href=\"#path_symlink\" name=\"path_symlink\"\u003e\u003c/a\u003e`uvwasi_path_symlink()`\n\nCreate a symbolic link.\n\nNote: This is similar to `symlinkat` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#path_symlink.old_path\" name=\"path_symlink.old_path\"\u003e\u003c/a\u003e\u003ccode\u003econst char \\*\u003cstrong\u003eold\\_path\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#path_symlink.old_path_len\" name=\"path_symlink.old_path_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003eold_path\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The contents of the symbolic link.\n\n- \u003ca href=\"#path_symlink.fd\" name=\"path_symlink.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The working directory at which the resolution of the path starts.\n\n- \u003ca href=\"#path_symlink.new_path\" name=\"path_symlink.new_path\"\u003e\u003c/a\u003e\u003ccode\u003econst char \\*\u003cstrong\u003enew\\_path\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#path_symlink.new_path_len\" name=\"path_symlink.new_path_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003enew\\_path\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The destination path at which to create the symbolic link.\n\n### \u003ca href=\"#path_unlink_file\" name=\"path_unlink_file\"\u003e\u003c/a\u003e`uvwasi_path_unlink_file()`\n\nUnlink a file.\n\nReturn [`UVWASI_EISDIR`](#errno.isdir) if the path refers to a directory.\n\nNote: This is similar to `unlinkat(fd, path, 0)` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#path_unlink_file.fd\" name=\"path_unlink_file.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n    The working directory at which the resolution of the path starts.\n\n- \u003ca href=\"#path_unlink_file.path\" name=\"path_unlink_file.path\"\u003e\u003c/a\u003e\u003ccode\u003econst char \\*\u003cstrong\u003epath\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#path_unlink_file.path_len\" name=\"path_unlink_file.path_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003epath\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The path to a file to unlink.\n\n### \u003ca href=\"#poll_oneoff\" name=\"poll_oneoff\"\u003e\u003c/a\u003e`uvwasi_poll_oneoff()`\n\nConcurrently poll for the occurrence of a set of events.\n\nInputs:\n\n- \u003ca href=\"#poll_oneoff.in\" name=\"poll_oneoff.in\"\u003e\u003c/a\u003e\u003ccode\u003econst [\\_\\_wasi\\_subscription\\_t](#subscription) \\*\u003cstrong\u003ein\u003c/strong\u003e\u003c/code\u003e\n\n    The events to which to subscribe.\n\n- \u003ca href=\"#poll_oneoff.out\" name=\"poll_oneoff.out\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_event\\_t](#event) \\*\u003cstrong\u003eout\u003c/strong\u003e\u003c/code\u003e\n\n    The events that have occurred.\n\n- \u003ca href=\"#poll_oneoff.nsubscriptions\" name=\"poll_oneoff.nsubscriptions\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003ensubscriptions\u003c/strong\u003e\u003c/code\u003e\n\n    Both the number of subscriptions and events.\n\nOutputs:\n\n- \u003ca href=\"#poll_oneoff.nevents\" name=\"poll_oneoff.nevents\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003enevents\u003c/strong\u003e\u003c/code\u003e\n\n    The number of events stored.\n\n### \u003ca href=\"#proc_exit\" name=\"proc_exit\"\u003e\u003c/a\u003e`uvwasi_proc_exit()`\n\nTerminate the process normally. An exit code of 0 indicates successful\ntermination of the program. The meanings of other values is dependent on\nthe environment.\n\nNote: This is similar to `_Exit` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#proc_exit.rval\" name=\"proc_exit.rval\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_exitcode\\_t](#exitcode) \u003cstrong\u003erval\u003c/strong\u003e\u003c/code\u003e\n\n    The exit code returned by the process.\n\nDoes not return.\n\n### \u003ca href=\"#proc_raise\" name=\"proc_raise\"\u003e\u003c/a\u003e`uvwasi_proc_raise()`\n\nSend a signal to the process of the calling thread.\n\nNote: This is similar to `raise` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#proc_raise.sig\" name=\"proc_raise.sig\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_signal\\_t](#signal) \u003cstrong\u003esig\u003c/strong\u003e\u003c/code\u003e\n\n    The signal condition to trigger.\n\n### \u003ca href=\"#random_get\" name=\"random_get\"\u003e\u003c/a\u003e`uvwasi_random_get()`\n\nWrite high-quality random data into a buffer.\n\nThis function blocks when the implementation is unable to immediately\nprovide sufficient high-quality random data.\n\nThis function may execute slowly, so when large mounts of random\ndata are required, it's advisable to use this function to seed a\npseudo-random number generator, rather than to provide the\nrandom data directly.\n\nInputs:\n\n- \u003ca href=\"#random_get.buf\" name=\"random_get.buf\"\u003e\u003c/a\u003e\u003ccode\u003evoid \\*\u003cstrong\u003ebuf\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#random_get.buf_len\" name=\"random_get.buf_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003ebuf\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The buffer to fill with random data.\n\n### \u003ca href=\"#sched_yield\" name=\"sched_yield\"\u003e\u003c/a\u003e`uvwasi_sched_yield()`\n\nTemporarily yield execution of the calling thread.\n\nNote: This is similar to `sched_yield` in POSIX.\n\n### \u003ca href=\"#sock_recv\" name=\"sock_recv\"\u003e\u003c/a\u003e`uvwasi_sock_recv()`\n\nReceive a message from a socket.\n\nNote: This is similar to `recv` in POSIX, though it also supports reading\nthe data into multiple buffers in the manner of `readv`.\n\nInputs:\n\n- \u003ca href=\"#sock_recv.sock\" name=\"sock_recv.sock\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003esock\u003c/strong\u003e\u003c/code\u003e\n\n    The socket on which to receive data.\n\n- \u003ca href=\"#sock_recv.ri_data\" name=\"sock_recv.ri_data\"\u003e\u003c/a\u003e\u003ccode\u003econst [\\_\\_wasi\\_iovec\\_t](#iovec) \\*\u003cstrong\u003eri\\_data\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#sock_recv.ri_data_len\" name=\"sock_recv.ri_data_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003eri\\_data\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    List of scatter/gather vectors to which to store data.\n\n- \u003ca href=\"#sock_recv.ri_flags\" name=\"sock_recv.ri_flags\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_riflags\\_t](#riflags) \u003cstrong\u003eri\\_flags\u003c/strong\u003e\u003c/code\u003e\n\n    Message flags.\n\nOutputs:\n\n- \u003ca href=\"#sock_recv.ro_datalen\" name=\"sock_recv.ro_datalen\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003ero\\_datalen\u003c/strong\u003e\u003c/code\u003e\n\n    Number of bytes stored in [`ri_data`](#sock_recv.ri_data).\n\n- \u003ca href=\"#sock_recv.ro_flags\" name=\"sock_recv.ro_flags\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_roflags\\_t](#roflags) \u003cstrong\u003ero\\_flags\u003c/strong\u003e\u003c/code\u003e\n\n    Message flags.\n\n### \u003ca href=\"#sock_send\" name=\"sock_send\"\u003e\u003c/a\u003e`uvwasi_sock_send()`\n\nSend a message on a socket.\n\nNote: This is similar to `send` in POSIX, though it also supports writing\nthe data from multiple buffers in the manner of `writev`.\n\nInputs:\n\n- \u003ca href=\"#sock_send.sock\" name=\"sock_send.sock\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003esock\u003c/strong\u003e\u003c/code\u003e\n\n    The socket on which to send data.\n\n- \u003ca href=\"#sock_send.si_data\" name=\"sock_send.si_data\"\u003e\u003c/a\u003e\u003ccode\u003econst [\\_\\_wasi\\_ciovec\\_t](#ciovec) \\*\u003cstrong\u003esi\\_data\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#sock_send.si_data_len\" name=\"sock_send.si_data_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003esi\\_data\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    List of scatter/gather vectors to which to retrieve data\n\n- \u003ca href=\"#sock_send.si_flags\" name=\"sock_send.si_flags\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_siflags\\_t](#siflags) \u003cstrong\u003esi\\_flags\u003c/strong\u003e\u003c/code\u003e\n\n    Message flags.\n\nOutputs:\n\n- \u003ca href=\"#sock_send.so_datalen\" name=\"sock_send.so_datalen\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003eso\\_datalen\u003c/strong\u003e\u003c/code\u003e\n\n    Number of bytes transmitted.\n\n### \u003ca href=\"#sock_shutdown\" name=\"sock_shutdown\"\u003e\u003c/a\u003e`uvwasi_sock_shutdown()`\n\nShut down socket send and receive channels.\n\nNote: This is similar to `shutdown` in POSIX.\n\nInputs:\n\n- \u003ca href=\"#sock_shutdown.sock\" name=\"sock_shutdown.sock\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003esock\u003c/strong\u003e\u003c/code\u003e\n\n    The socket on which to shutdown channels.\n\n- \u003ca href=\"#sock_shutdown.how\" name=\"sock_shutdown.how\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_sdflags\\_t](#sdflags) \u003cstrong\u003ehow\u003c/strong\u003e\u003c/code\u003e\n\n    Which channels on the socket to shut down.\n\n## Types\n\n### \u003ca href=\"#advice\" name=\"advice\"\u003e\u003c/a\u003e`uvwasi_advice_t` (`uint8_t`)\n\nFile or memory access pattern advisory information.\n\nUsed by [`uvwasi_fd_advise()`](#fd_advise).\n\nPossible values:\n\n- \u003ca href=\"#advice.dontneed\" name=\"advice.dontneed\"\u003e\u003c/a\u003e**`UVWASI_ADVICE_DONTNEED`**\n\n    The application expects that it will not access the\n    specified data in the near future.\n\n- \u003ca href=\"#advice.noreuse\" name=\"advice.noreuse\"\u003e\u003c/a\u003e**`UVWASI_ADVICE_NOREUSE`**\n\n    The application expects to access the specified data\n    once and then not reuse it thereafter.\n\n- \u003ca href=\"#advice.normal\" name=\"advice.normal\"\u003e\u003c/a\u003e**`UVWASI_ADVICE_NORMAL`**\n\n    The application has no advice to give on its behavior\n    with respect to the specified data.\n\n- \u003ca href=\"#advice.random\" name=\"advice.random\"\u003e\u003c/a\u003e**`UVWASI_ADVICE_RANDOM`**\n\n    The application expects to access the specified data\n    in a random order.\n\n- \u003ca href=\"#advice.sequential\" name=\"advice.sequential\"\u003e\u003c/a\u003e**`UVWASI_ADVICE_SEQUENTIAL`**\n\n    The application expects to access the specified data\n    sequentially from lower offsets to higher offsets.\n\n- \u003ca href=\"#advice.willneed\" name=\"advice.willneed\"\u003e\u003c/a\u003e**`UVWASI_ADVICE_WILLNEED`**\n\n    The application expects to access the specified data\n    in the near future.\n\n### \u003ca href=\"#ciovec\" name=\"ciovec\"\u003e\u003c/a\u003e`uvwasi_ciovec_t` (`struct`)\n\nA region of memory for scatter/gather writes.\n\nUsed by [`uvwasi_fd_pwrite()`](#fd_pwrite), [`uvwasi_fd_write()`](#fd_write), and [`uvwasi_sock_send()`](#sock_send).\n\nMembers:\n\n- \u003ca href=\"#ciovec.buf\" name=\"ciovec.buf\"\u003e\u003c/a\u003e\u003ccode\u003econst void \\*\u003cstrong\u003ebuf\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#ciovec.buf_len\" name=\"ciovec.buf_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003ebuf\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The address and length of the buffer to be written.\n\n### \u003ca href=\"#clockid\" name=\"clockid\"\u003e\u003c/a\u003e`uvwasi_clockid_t` (`uint32_t`)\n\nIdentifiers for clocks.\n\nUsed by [`uvwasi_subscription_t`](#subscription), [`uvwasi_clock_res_get()`](#clock_res_get), and [`uvwasi_clock_time_get()`](#clock_time_get).\n\nPossible values:\n\n- \u003ca href=\"#clockid.monotonic\" name=\"clockid.monotonic\"\u003e\u003c/a\u003e**`UVWASI_CLOCK_MONOTONIC`**\n\n    The store-wide monotonic clock, which is defined as a\n    clock measuring real time, whose value cannot be\n    adjusted and which cannot have negative clock jumps.\n\n    The epoch of this clock is undefined. The absolute\n    time value of this clock therefore has no meaning.\n\n- \u003ca href=\"#clockid.process_cputime_id\" name=\"clockid.process_cputime_id\"\u003e\u003c/a\u003e**`UVWASI_CLOCK_PROCESS_CPUTIME_ID`**\n\n    The CPU-time clock associated with the current\n    process.\n\n- \u003ca href=\"#clockid.realtime\" name=\"clockid.realtime\"\u003e\u003c/a\u003e**`UVWASI_CLOCK_REALTIME`**\n\n    The clock measuring real time. Time value\n    zero corresponds with 1970-01-01T00:00:00Z.\n\n- \u003ca href=\"#clockid.thread_cputime_id\" name=\"clockid.thread_cputime_id\"\u003e\u003c/a\u003e**`UVWASI_CLOCK_THREAD_CPUTIME_ID`**\n\n    The CPU-time clock associated with the current thread.\n\n### \u003ca href=\"#device\" name=\"device\"\u003e\u003c/a\u003e`uvwasi_device_t` (`uint64_t`)\n\nIdentifier for a device containing a file system. Can be used\nin combination with [`uvwasi_inode_t`](#inode) to uniquely identify a file or\ndirectory in the filesystem.\n\nUsed by [`uvwasi_filestat_t`](#filestat).\n\n### \u003ca href=\"#dircookie\" name=\"dircookie\"\u003e\u003c/a\u003e`uvwasi_dircookie_t` (`uint64_t`)\n\nA reference to the offset of a directory entry.\n\nUsed by [`uvwasi_dirent_t`](#dirent) and [`uvwasi_fd_readdir()`](#fd_readdir).\n\nSpecial values:\n\n- \u003ca href=\"#dircookie.start\" name=\"dircookie.start\"\u003e\u003c/a\u003e**`UVWASI_DIRCOOKIE_START`**\n\n    Permanent reference to the first directory entry\n    within a directory.\n\n### \u003ca href=\"#dirent\" name=\"dirent\"\u003e\u003c/a\u003e`uvwasi_dirent_t` (`struct`)\n\nA directory entry.\n\nMembers:\n\n- \u003ca href=\"#dirent.d_next\" name=\"dirent.d_next\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_dircookie\\_t](#dircookie) \u003cstrong\u003ed\\_next\u003c/strong\u003e\u003c/code\u003e\n\n    The offset of the next directory entry stored in this\n    directory.\n\n- \u003ca href=\"#dirent.d_ino\" name=\"dirent.d_ino\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_inode\\_t](#inode) \u003cstrong\u003ed\\_ino\u003c/strong\u003e\u003c/code\u003e\n\n    The serial number of the file referred to by this\n    directory entry.\n\n- \u003ca href=\"#dirent.d_namlen\" name=\"dirent.d_namlen\"\u003e\u003c/a\u003e\u003ccode\u003euint32\\_t \u003cstrong\u003ed\\_namlen\u003c/strong\u003e\u003c/code\u003e\n\n    The length of the name of the directory entry.\n\n- \u003ca href=\"#dirent.d_type\" name=\"dirent.d_type\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_filetype\\_t](#filetype) \u003cstrong\u003ed\\_type\u003c/strong\u003e\u003c/code\u003e\n\n    The type of the file referred to by this directory\n    entry.\n\n### \u003ca href=\"#errno\" name=\"errno\"\u003e\u003c/a\u003e`uvwasi_errno_t` (`uint16_t`)\n\nError codes returned by functions.\n\nNot all of these error codes are returned by the functions\nprovided by this API; some are used in higher-level library layers,\nand others are provided merely for alignment with POSIX.\n\nUsed by [`uvwasi_event_t`](#event).\n\nPossible values:\n\n- \u003ca href=\"#errno.success\" name=\"errno.success\"\u003e\u003c/a\u003e**`UVWASI_ESUCCESS`**\n\n    No error occurred. System call completed successfully.\n\n- \u003ca href=\"#errno.2big\" name=\"errno.2big\"\u003e\u003c/a\u003e**`UVWASI_E2BIG`**\n\n    Argument list too long.\n\n- \u003ca href=\"#errno.acces\" name=\"errno.acces\"\u003e\u003c/a\u003e**`UVWASI_EACCES`**\n\n    Permission denied.\n\n- \u003ca href=\"#errno.addrinuse\" name=\"errno.addrinuse\"\u003e\u003c/a\u003e**`UVWASI_EADDRINUSE`**\n\n    Address in use.\n\n- \u003ca href=\"#errno.addrnotavail\" name=\"errno.addrnotavail\"\u003e\u003c/a\u003e**`UVWASI_EADDRNOTAVAIL`**\n\n    Address not available.\n\n- \u003ca href=\"#errno.afnosupport\" name=\"errno.afnosupport\"\u003e\u003c/a\u003e**`UVWASI_EAFNOSUPPORT`**\n\n    Address family not supported.\n\n- \u003ca href=\"#errno.again\" name=\"errno.again\"\u003e\u003c/a\u003e**`UVWASI_EAGAIN`**\n\n    Resource unavailable, or operation would block.\n\n- \u003ca href=\"#errno.already\" name=\"errno.already\"\u003e\u003c/a\u003e**`UVWASI_EALREADY`**\n\n    Connection already in progress.\n\n- \u003ca href=\"#errno.badf\" name=\"errno.badf\"\u003e\u003c/a\u003e**`UVWASI_EBADF`**\n\n    Bad file descriptor.\n\n- \u003ca href=\"#errno.badmsg\" name=\"errno.badmsg\"\u003e\u003c/a\u003e**`UVWASI_EBADMSG`**\n\n    Bad message.\n\n- \u003ca href=\"#errno.busy\" name=\"errno.busy\"\u003e\u003c/a\u003e**`UVWASI_EBUSY`**\n\n    Device or resource busy.\n\n- \u003ca href=\"#errno.canceled\" name=\"errno.canceled\"\u003e\u003c/a\u003e**`UVWASI_ECANCELED`**\n\n    Operation canceled.\n\n- \u003ca href=\"#errno.child\" name=\"errno.child\"\u003e\u003c/a\u003e**`UVWASI_ECHILD`**\n\n    No child processes.\n\n- \u003ca href=\"#errno.connaborted\" name=\"errno.connaborted\"\u003e\u003c/a\u003e**`UVWASI_ECONNABORTED`**\n\n    Connection aborted.\n\n- \u003ca href=\"#errno.connrefused\" name=\"errno.connrefused\"\u003e\u003c/a\u003e**`UVWASI_ECONNREFUSED`**\n\n    Connection refused.\n\n- \u003ca href=\"#errno.connreset\" name=\"errno.connreset\"\u003e\u003c/a\u003e**`UVWASI_ECONNRESET`**\n\n    Connection reset.\n\n- \u003ca href=\"#errno.deadlk\" name=\"errno.deadlk\"\u003e\u003c/a\u003e**`UVWASI_EDEADLK`**\n\n    Resource deadlock would occur.\n\n- \u003ca href=\"#errno.destaddrreq\" name=\"errno.destaddrreq\"\u003e\u003c/a\u003e**`UVWASI_EDESTADDRREQ`**\n\n    Destination address required.\n\n- \u003ca href=\"#errno.dom\" name=\"errno.dom\"\u003e\u003c/a\u003e**`UVWASI_EDOM`**\n\n    Mathematics argument out of domain of function.\n\n- \u003ca href=\"#errno.dquot\" name=\"errno.dquot\"\u003e\u003c/a\u003e**`UVWASI_EDQUOT`**\n\n    Reserved.\n\n- \u003ca href=\"#errno.exist\" name=\"errno.exist\"\u003e\u003c/a\u003e**`UVWASI_EEXIST`**\n\n    File exists.\n\n- \u003ca href=\"#errno.fault\" name=\"errno.fault\"\u003e\u003c/a\u003e**`UVWASI_EFAULT`**\n\n    Bad address.\n\n- \u003ca href=\"#errno.fbig\" name=\"errno.fbig\"\u003e\u003c/a\u003e**`UVWASI_EFBIG`**\n\n    File too large.\n\n- \u003ca href=\"#errno.hostunreach\" name=\"errno.hostunreach\"\u003e\u003c/a\u003e**`UVWASI_EHOSTUNREACH`**\n\n    Host is unreachable.\n\n- \u003ca href=\"#errno.idrm\" name=\"errno.idrm\"\u003e\u003c/a\u003e**`UVWASI_EIDRM`**\n\n    Identifier removed.\n\n- \u003ca href=\"#errno.ilseq\" name=\"errno.ilseq\"\u003e\u003c/a\u003e**`UVWASI_EILSEQ`**\n\n    Illegal byte sequence.\n\n- \u003ca href=\"#errno.inprogress\" name=\"errno.inprogress\"\u003e\u003c/a\u003e**`UVWASI_EINPROGRESS`**\n\n    Operation in progress.\n\n- \u003ca href=\"#errno.intr\" name=\"errno.intr\"\u003e\u003c/a\u003e**`UVWASI_EINTR`**\n\n    Interrupted function.\n\n- \u003ca href=\"#errno.inval\" name=\"errno.inval\"\u003e\u003c/a\u003e**`UVWASI_EINVAL`**\n\n    Invalid argument.\n\n- \u003ca href=\"#errno.io\" name=\"errno.io\"\u003e\u003c/a\u003e**`UVWASI_EIO`**\n\n    I/O error.\n\n- \u003ca href=\"#errno.isconn\" name=\"errno.isconn\"\u003e\u003c/a\u003e**`UVWASI_EISCONN`**\n\n    Socket is connected.\n\n- \u003ca href=\"#errno.isdir\" name=\"errno.isdir\"\u003e\u003c/a\u003e**`UVWASI_EISDIR`**\n\n    Is a directory.\n\n- \u003ca href=\"#errno.loop\" name=\"errno.loop\"\u003e\u003c/a\u003e**`UVWASI_ELOOP`**\n\n    Too many levels of symbolic links.\n\n- \u003ca href=\"#errno.mfile\" name=\"errno.mfile\"\u003e\u003c/a\u003e**`UVWASI_EMFILE`**\n\n    File descriptor value too large.\n\n- \u003ca href=\"#errno.mlink\" name=\"errno.mlink\"\u003e\u003c/a\u003e**`UVWASI_EMLINK`**\n\n    Too many links.\n\n- \u003ca href=\"#errno.msgsize\" name=\"errno.msgsize\"\u003e\u003c/a\u003e**`UVWASI_EMSGSIZE`**\n\n    Message too large.\n\n- \u003ca href=\"#errno.multihop\" name=\"errno.multihop\"\u003e\u003c/a\u003e**`UVWASI_EMULTIHOP`**\n\n    Reserved.\n\n- \u003ca href=\"#errno.nametoolong\" name=\"errno.nametoolong\"\u003e\u003c/a\u003e**`UVWASI_ENAMETOOLONG`**\n\n    Filename too long.\n\n- \u003ca href=\"#errno.netdown\" name=\"errno.netdown\"\u003e\u003c/a\u003e**`UVWASI_ENETDOWN`**\n\n    Network is down.\n\n- \u003ca href=\"#errno.netreset\" name=\"errno.netreset\"\u003e\u003c/a\u003e**`UVWASI_ENETRESET`**\n\n    Connection aborted by network.\n\n- \u003ca href=\"#errno.netunreach\" name=\"errno.netunreach\"\u003e\u003c/a\u003e**`UVWASI_ENETUNREACH`**\n\n    Network unreachable.\n\n- \u003ca href=\"#errno.nfile\" name=\"errno.nfile\"\u003e\u003c/a\u003e**`UVWASI_ENFILE`**\n\n    Too many files open in system.\n\n- \u003ca href=\"#errno.nobufs\" name=\"errno.nobufs\"\u003e\u003c/a\u003e**`UVWASI_ENOBUFS`**\n\n    No buffer space available.\n\n- \u003ca href=\"#errno.nodev\" name=\"errno.nodev\"\u003e\u003c/a\u003e**`UVWASI_ENODEV`**\n\n    No such device.\n\n- \u003ca href=\"#errno.noent\" name=\"errno.noent\"\u003e\u003c/a\u003e**`UVWASI_ENOENT`**\n\n    No such file or directory.\n\n- \u003ca href=\"#errno.noexec\" name=\"errno.noexec\"\u003e\u003c/a\u003e**`UVWASI_ENOEXEC`**\n\n    Executable file format error.\n\n- \u003ca href=\"#errno.nolck\" name=\"errno.nolck\"\u003e\u003c/a\u003e**`UVWASI_ENOLCK`**\n\n    No locks available.\n\n- \u003ca href=\"#errno.nolink\" name=\"errno.nolink\"\u003e\u003c/a\u003e**`UVWASI_ENOLINK`**\n\n    Reserved.\n\n- \u003ca href=\"#errno.nomem\" name=\"errno.nomem\"\u003e\u003c/a\u003e**`UVWASI_ENOMEM`**\n\n    Not enough space.\n\n- \u003ca href=\"#errno.nomsg\" name=\"errno.nomsg\"\u003e\u003c/a\u003e**`UVWASI_ENOMSG`**\n\n    No message of the desired type.\n\n- \u003ca href=\"#errno.noprotoopt\" name=\"errno.noprotoopt\"\u003e\u003c/a\u003e**`UVWASI_ENOPROTOOPT`**\n\n    Protocol not available.\n\n- \u003ca href=\"#errno.nospc\" name=\"errno.nospc\"\u003e\u003c/a\u003e**`UVWASI_ENOSPC`**\n\n    No space left on device.\n\n- \u003ca href=\"#errno.nosys\" name=\"errno.nosys\"\u003e\u003c/a\u003e**`UVWASI_ENOSYS`**\n\n    Function not supported.\n\n- \u003ca href=\"#errno.notconn\" name=\"errno.notconn\"\u003e\u003c/a\u003e**`UVWASI_ENOTCONN`**\n\n    The socket is not connected.\n\n- \u003ca href=\"#errno.notdir\" name=\"errno.notdir\"\u003e\u003c/a\u003e**`UVWASI_ENOTDIR`**\n\n    Not a directory or a symbolic link to a directory.\n\n- \u003ca href=\"#errno.notempty\" name=\"errno.notempty\"\u003e\u003c/a\u003e**`UVWASI_ENOTEMPTY`**\n\n    Directory not empty.\n\n- \u003ca href=\"#errno.notrecoverable\" name=\"errno.notrecoverable\"\u003e\u003c/a\u003e**`UVWASI_ENOTRECOVERABLE`**\n\n    State not recoverable.\n\n- \u003ca href=\"#errno.notsock\" name=\"errno.notsock\"\u003e\u003c/a\u003e**`UVWASI_ENOTSOCK`**\n\n    Not a socket.\n\n- \u003ca href=\"#errno.notsup\" name=\"errno.notsup\"\u003e\u003c/a\u003e**`UVWASI_ENOTSUP`**\n\n    Not supported, or operation not supported on socket.\n\n- \u003ca href=\"#errno.notty\" name=\"errno.notty\"\u003e\u003c/a\u003e**`UVWASI_ENOTTY`**\n\n    Inappropriate I/O control operation.\n\n- \u003ca href=\"#errno.nxio\" name=\"errno.nxio\"\u003e\u003c/a\u003e**`UVWASI_ENXIO`**\n\n    No such device or address.\n\n- \u003ca href=\"#errno.overflow\" name=\"errno.overflow\"\u003e\u003c/a\u003e**`UVWASI_EOVERFLOW`**\n\n    Value too large to be stored in data type.\n\n- \u003ca href=\"#errno.ownerdead\" name=\"errno.ownerdead\"\u003e\u003c/a\u003e**`UVWASI_EOWNERDEAD`**\n\n    Previous owner died.\n\n- \u003ca href=\"#errno.perm\" name=\"errno.perm\"\u003e\u003c/a\u003e**`UVWASI_EPERM`**\n\n    Operation not permitted.\n\n- \u003ca href=\"#errno.pipe\" name=\"errno.pipe\"\u003e\u003c/a\u003e**`UVWASI_EPIPE`**\n\n    Broken pipe.\n\n- \u003ca href=\"#errno.proto\" name=\"errno.proto\"\u003e\u003c/a\u003e**`UVWASI_EPROTO`**\n\n    Protocol error.\n\n- \u003ca href=\"#errno.protonosupport\" name=\"errno.protonosupport\"\u003e\u003c/a\u003e**`UVWASI_EPROTONOSUPPORT`**\n\n    Protocol not supported.\n\n- \u003ca href=\"#errno.prototype\" name=\"errno.prototype\"\u003e\u003c/a\u003e**`UVWASI_EPROTOTYPE`**\n\n    Protocol wrong type for socket.\n\n- \u003ca href=\"#errno.range\" name=\"errno.range\"\u003e\u003c/a\u003e**`UVWASI_ERANGE`**\n\n    Result too large.\n\n- \u003ca href=\"#errno.rofs\" name=\"errno.rofs\"\u003e\u003c/a\u003e**`UVWASI_EROFS`**\n\n    Read-only file system.\n\n- \u003ca href=\"#errno.spipe\" name=\"errno.spipe\"\u003e\u003c/a\u003e**`UVWASI_ESPIPE`**\n\n    Invalid seek.\n\n- \u003ca href=\"#errno.srch\" name=\"errno.srch\"\u003e\u003c/a\u003e**`UVWASI_ESRCH`**\n\n    No such process.\n\n- \u003ca href=\"#errno.stale\" name=\"errno.stale\"\u003e\u003c/a\u003e**`UVWASI_ESTALE`**\n\n    Reserved.\n\n- \u003ca href=\"#errno.timedout\" name=\"errno.timedout\"\u003e\u003c/a\u003e**`UVWASI_ETIMEDOUT`**\n\n    Connection timed out.\n\n- \u003ca href=\"#errno.txtbsy\" name=\"errno.txtbsy\"\u003e\u003c/a\u003e**`UVWASI_ETXTBSY`**\n\n    Text file busy.\n\n- \u003ca href=\"#errno.xdev\" name=\"errno.xdev\"\u003e\u003c/a\u003e**`UVWASI_EXDEV`**\n\n    Cross-device link.\n\n- \u003ca href=\"#errno.notcapable\" name=\"errno.notcapable\"\u003e\u003c/a\u003e**`UVWASI_ENOTCAPABLE`**\n\n    Extension: Capabilities insufficient.\n\n### \u003ca href=\"#event\" name=\"event\"\u003e\u003c/a\u003e`uvwasi_event_t` (`struct`)\n\nAn event that occurred.\n\nUsed by [`uvwasi_poll_oneoff()`](#poll_oneoff).\n\nMembers:\n\n- \u003ca href=\"#event.userdata\" name=\"event.userdata\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_userdata\\_t](#userdata) \u003cstrong\u003euserdata\u003c/strong\u003e\u003c/code\u003e\n\n    User-provided value that got attached to\n    [`uvwasi_subscription_t::userdata`](#subscription.userdata).\n\n- \u003ca href=\"#event.error\" name=\"event.error\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_errno\\_t](#errno) \u003cstrong\u003eerror\u003c/strong\u003e\u003c/code\u003e\n\n    If non-zero, an error that occurred while processing\n    the subscription request.\n\n- \u003ca href=\"#event.type\" name=\"event.type\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_eventtype\\_t](#eventtype) \u003cstrong\u003etype\u003c/strong\u003e\u003c/code\u003e\n\n    The type of the event that occurred.\n\n- When `type` is [`UVWASI_EVENTTYPE_FD_READ`](#eventtype.fd_read) or [`UVWASI_EVENTTYPE_FD_WRITE`](#eventtype.fd_write):\n\n    - \u003ca href=\"#event.u.fd_readwrite\" name=\"event.u.fd_readwrite\"\u003e\u003c/a\u003e**`u.fd_readwrite`**\n\n        - \u003ca href=\"#event.u.fd_readwrite.nbytes\" name=\"event.u.fd_readwrite.nbytes\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_filesize\\_t](#filesize) \u003cstrong\u003enbytes\u003c/strong\u003e\u003c/code\u003e\n\n            The number of bytes available for reading or writing.\n\n        - \u003ca href=\"#event.u.fd_readwrite.flags\" name=\"event.u.fd_readwrite.flags\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_eventrwflags\\_t](#eventrwflags) \u003cstrong\u003eflags\u003c/strong\u003e\u003c/code\u003e\n\n            The state of the file descriptor.\n\n### \u003ca href=\"#eventrwflags\" name=\"eventrwflags\"\u003e\u003c/a\u003e`uvwasi_eventrwflags_t` (`uint16_t` bitfield)\n\nThe state of the file descriptor subscribed to with\n[`UVWASI_EVENTTYPE_FD_READ`](#eventtype.fd_read) or [`UVWASI_EVENTTYPE_FD_WRITE`](#eventtype.fd_write).\n\nUsed by [`uvwasi_event_t`](#event).\n\nPossible values:\n\n- \u003ca href=\"#eventrwflags.hangup\" name=\"eventrwflags.hangup\"\u003e\u003c/a\u003e**`UVWASI_EVENT_FD_READWRITE_HANGUP`**\n\n    The peer of this socket has closed or disconnected.\n\n### \u003ca href=\"#eventtype\" name=\"eventtype\"\u003e\u003c/a\u003e`uvwasi_eventtype_t` (`uint8_t`)\n\nType of a subscription to an event or its occurrence.\n\nUsed by [`uvwasi_event_t`](#event) and [`uvwasi_subscription_t`](#subscription).\n\nPossible values:\n\n- \u003ca href=\"#eventtype.u.clock\" name=\"eventtype.u.clock\"\u003e\u003c/a\u003e**`UVWASI_EVENTTYPE_CLOCK`**\n\n    The time value of clock [`uvwasi_subscription_t::u.clock.clock_id`](#subscription.u.clock.clock_id)\n    has reached timestamp [`uvwasi_subscription_t::u.clock.timeout`](#subscription.u.clock.timeout).\n\n- \u003ca href=\"#eventtype.fd_read\" name=\"eventtype.fd_read\"\u003e\u003c/a\u003e**`UVWASI_EVENTTYPE_FD_READ`**\n\n    File descriptor [`uvwasi_subscription_t::u.fd_readwrite.fd`](#subscription.u.fd_readwrite.fd) has\n    data available for reading. This event always triggers\n    for regular files.\n\n- \u003ca href=\"#eventtype.fd_write\" name=\"eventtype.fd_write\"\u003e\u003c/a\u003e**`UVWASI_EVENTTYPE_FD_WRITE`**\n\n    File descriptor [`uvwasi_subscription_t::u.fd_readwrite.fd`](#subscription.u.fd_readwrite.fd) has\n    capacity available for writing. This event always\n    triggers for regular files.\n\n### \u003ca href=\"#exitcode\" name=\"exitcode\"\u003e\u003c/a\u003e`uvwasi_exitcode_t` (`uint32_t`)\n\nExit code generated by a process when exiting.\n\nUsed by [`uvwasi_proc_exit()`](#proc_exit).\n\n### \u003ca href=\"#fd\" name=\"fd\"\u003e\u003c/a\u003e`uvwasi_fd_t` (`uint32_t`)\n\nA file descriptor number.\n\nUsed by many functions in this API.\n\nAs in POSIX, three file descriptor numbers are provided to instances\non startup -- 0, 1, and 2, (a.k.a. `STDIN_FILENO`, `STDOUT_FILENO`,\nand `STDERR_FILENO`).\n\nOther than these, WASI implementations are not required to allocate\nnew file descriptors in ascending order.\n\n### \u003ca href=\"#fdflags\" name=\"fdflags\"\u003e\u003c/a\u003e`uvwasi_fdflags_t` (`uint16_t` bitfield)\n\nFile descriptor flags.\n\nUsed by [`uvwasi_fdstat_t`](#fdstat), [`uvwasi_fd_fdstat_set_flags()`](#fd_fdstat_set_flags), and [`uvwasi_path_open()`](#path_open).\n\nPossible values:\n\n- \u003ca href=\"#fdflags.append\" name=\"fdflags.append\"\u003e\u003c/a\u003e**`UVWASI_FDFLAG_APPEND`**\n\n    Append mode: Data written to the file is always\n    appended to the file's end.\n\n- \u003ca href=\"#fdflags.dsync\" name=\"fdflags.dsync\"\u003e\u003c/a\u003e**`UVWASI_FDFLAG_DSYNC`**\n\n    Write according to synchronized I/O data integrity\n    completion. Only the data stored in the file is\n    synchronized.\n\n- \u003ca href=\"#fdflags.nonblock\" name=\"fdflags.nonblock\"\u003e\u003c/a\u003e**`UVWASI_FDFLAG_NONBLOCK`**\n\n    Non-blocking mode.\n\n- \u003ca href=\"#fdflags.rsync\" name=\"fdflags.rsync\"\u003e\u003c/a\u003e**`UVWASI_FDFLAG_RSYNC`**\n\n    Synchronized read I/O operations.\n\n- \u003ca href=\"#fdflags.sync\" name=\"fdflags.sync\"\u003e\u003c/a\u003e**`UVWASI_FDFLAG_SYNC`**\n\n    Write according to synchronized I/O file integrity completion.\n    In addition to synchronizing the data stored in the file, the\n    implementation may also synchronously update the file's metadata.\n\n### \u003ca href=\"#fdstat\" name=\"fdstat\"\u003e\u003c/a\u003e`uvwasi_fdstat_t` (`struct`)\n\nFile descriptor attributes.\n\nUsed by [`uvwasi_fd_fdstat_get()`](#fd_fdstat_get).\n\nMembers:\n\n- \u003ca href=\"#fdstat.fs_filetype\" name=\"fdstat.fs_filetype\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_filetype\\_t](#filetype) \u003cstrong\u003efs\\_filetype\u003c/strong\u003e\u003c/code\u003e\n\n    File type.\n\n- \u003ca href=\"#fdstat.fs_flags\" name=\"fdstat.fs_flags\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fdflags\\_t](#fdflags) \u003cstrong\u003efs\\_flags\u003c/strong\u003e\u003c/code\u003e\n\n    File descriptor flags.\n\n- \u003ca href=\"#fdstat.fs_rights_base\" name=\"fdstat.fs_rights_base\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_rights\\_t](#rights) \u003cstrong\u003efs\\_rights\\_base\u003c/strong\u003e\u003c/code\u003e\n\n    Rights that apply to this file descriptor.\n\n- \u003ca href=\"#fdstat.fs_rights_inheriting\" name=\"fdstat.fs_rights_inheriting\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_rights\\_t](#rights) \u003cstrong\u003efs\\_rights\\_inheriting\u003c/strong\u003e\u003c/code\u003e\n\n    Maximum set of rights that may be installed on new\n    file descriptors that are created through this file\n    descriptor, e.g., through [`uvwasi_path_open()`](#path_open).\n\n### \u003ca href=\"#filedelta\" name=\"filedelta\"\u003e\u003c/a\u003e`uvwasi_filedelta_t` (`int64_t`)\n\nRelative offset within a file.\n\nUsed by [`uvwasi_fd_seek()`](#fd_seek).\n\n### \u003ca href=\"#filesize\" name=\"filesize\"\u003e\u003c/a\u003e`uvwasi_filesize_t` (`uint64_t`)\n\nNon-negative file size or length of a region within a file.\n\nUsed by [`uvwasi_event_t`](#event), [`uvwasi_filestat_t`](#filestat), [`uvwasi_fd_pread()`](#fd_pread), [`uvwasi_fd_pwrite()`](#fd_pwrite), [`uvwasi_fd_seek()`](#fd_seek), [`uvwasi_path_tell()`](#path_tell), [`uvwasi_fd_advise()`](#fd_advise), [`uvwasi_fd_allocate()`](#fd_allocate), and [`uvwasi_fd_filestat_set_size()`](#fd_filestat_set_size).\n\n### \u003ca href=\"#filestat\" name=\"filestat\"\u003e\u003c/a\u003e`uvwasi_filestat_t` (`struct`)\n\nFile attributes.\n\nUsed by [`uvwasi_fd_filestat_get()`](#fd_filestat_get) and [`uvwasi_path_filestat_get()`](#path_filestat_get).\n\nMembers:\n\n- \u003ca href=\"#filestat.st_dev\" name=\"filestat.st_dev\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_device\\_t](#device) \u003cstrong\u003est\\_dev\u003c/strong\u003e\u003c/code\u003e\n\n    Device ID of device containing the file.\n\n- \u003ca href=\"#filestat.st_ino\" name=\"filestat.st_ino\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_inode\\_t](#inode) \u003cstrong\u003est\\_ino\u003c/strong\u003e\u003c/code\u003e\n\n    File serial number.\n\n- \u003ca href=\"#filestat.st_filetype\" name=\"filestat.st_filetype\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_filetype\\_t](#filetype) \u003cstrong\u003est\\_filetype\u003c/strong\u003e\u003c/code\u003e\n\n    File type.\n\n- \u003ca href=\"#filestat.st_nlink\" name=\"filestat.st_nlink\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_linkcount\\_t](#linkcount) \u003cstrong\u003est\\_nlink\u003c/strong\u003e\u003c/code\u003e\n\n    Number of hard links to the file.\n\n- \u003ca href=\"#filestat.st_size\" name=\"filestat.st_size\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_filesize\\_t](#filesize) \u003cstrong\u003est\\_size\u003c/strong\u003e\u003c/code\u003e\n\n    For regular files, the file size in bytes. For\n    symbolic links, the length in bytes of the pathname\n    contained in the symbolic link.\n\n- \u003ca href=\"#filestat.st_atim\" name=\"filestat.st_atim\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_timestamp\\_t](#timestamp) \u003cstrong\u003est\\_atim\u003c/strong\u003e\u003c/code\u003e\n\n    Last data access timestamp.\n\n- \u003ca href=\"#filestat.st_mtim\" name=\"filestat.st_mtim\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_timestamp\\_t](#timestamp) \u003cstrong\u003est\\_mtim\u003c/strong\u003e\u003c/code\u003e\n\n    Last data modification timestamp.\n\n- \u003ca href=\"#filestat.st_ctim\" name=\"filestat.st_ctim\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_timestamp\\_t](#timestamp) \u003cstrong\u003est\\_ctim\u003c/strong\u003e\u003c/code\u003e\n\n    Last file status change timestamp.\n\n### \u003ca href=\"#filetype\" name=\"filetype\"\u003e\u003c/a\u003e`uvwasi_filetype_t` (`uint8_t`)\n\nThe type of a file descriptor or file.\n\nUsed by [`uvwasi_dirent_t`](#dirent), [`uvwasi_fdstat_t`](#fdstat), and [`uvwasi_filestat_t`](#filestat).\n\nPossible values:\n\n- \u003ca href=\"#filetype.unknown\" name=\"filetype.unknown\"\u003e\u003c/a\u003e**`UVWASI_FILETYPE_UNKNOWN`**\n\n    The type of the file descriptor or file is unknown or\n    is different from any of the other types specified.\n\n- \u003ca href=\"#filetype.block_device\" name=\"filetype.block_device\"\u003e\u003c/a\u003e**`UVWASI_FILETYPE_BLOCK_DEVICE`**\n\n    The file descriptor or file refers to a block device\n    inode.\n\n- \u003ca href=\"#filetype.character_device\" name=\"filetype.character_device\"\u003e\u003c/a\u003e**`UVWASI_FILETYPE_CHARACTER_DEVICE`**\n\n    The file descriptor or file refers to a character\n    device inode.\n\n- \u003ca href=\"#filetype.directory\" name=\"filetype.directory\"\u003e\u003c/a\u003e**`UVWASI_FILETYPE_DIRECTORY`**\n\n    The file descriptor or file refers to a directory\n    inode.\n\n- \u003ca href=\"#filetype.regular_file\" name=\"filetype.regular_file\"\u003e\u003c/a\u003e**`UVWASI_FILETYPE_REGULAR_FILE`**\n\n    The file descriptor or file refers to a regular file\n    inode.\n\n- \u003ca href=\"#filetype.socket_dgram\" name=\"filetype.socket_dgram\"\u003e\u003c/a\u003e**`UVWASI_FILETYPE_SOCKET_DGRAM`**\n\n    The file descriptor or file refers to a datagram\n    socket.\n\n- \u003ca href=\"#filetype.socket_stream\" name=\"filetype.socket_stream\"\u003e\u003c/a\u003e**`UVWASI_FILETYPE_SOCKET_STREAM`**\n\n    The file descriptor or file refers to a byte-stream\n    socket.\n\n- \u003ca href=\"#filetype.symbolic_link\" name=\"filetype.symbolic_link\"\u003e\u003c/a\u003e**`UVWASI_FILETYPE_SYMBOLIC_LINK`**\n\n    The file refers to a symbolic link inode.\n\n### \u003ca href=\"#fstflags\" name=\"fstflags\"\u003e\u003c/a\u003e`uvwasi_fstflags_t` (`uint16_t` bitfield)\n\nWhich file time attributes to adjust.\n\nUsed by [`uvwasi_fd_filestat_set_times()`](#fd_filestat_set_times) and [`uvwasi_path_filestat_set_times()`](#path_filestat_set_times).\n\nPossible values:\n\n- \u003ca href=\"#fstflags.atim\" name=\"fstflags.atim\"\u003e\u003c/a\u003e**`UVWASI_FILESTAT_SET_ATIM`**\n\n    Adjust the last data access timestamp to the value\n    stored in [`uvwasi_filestat_t::st_atim`](#filestat.st_atim).\n\n- \u003ca href=\"#fstflags.atim_now\" name=\"fstflags.atim_now\"\u003e\u003c/a\u003e**`UVWASI_FILESTAT_SET_ATIM_NOW`**\n\n    Adjust the last data access timestamp to the time\n    of clock [`UVWASI_CLOCK_REALTIME`](#clockid.realtime).\n\n- \u003ca href=\"#fstflags.mtim\" name=\"fstflags.mtim\"\u003e\u003c/a\u003e**`UVWASI_FILESTAT_SET_MTIM`**\n\n    Adjust the last data modification timestamp to the\n    value stored in [`uvwasi_filestat_t::st_mtim`](#filestat.st_mtim).\n\n- \u003ca href=\"#fstflags.mtim_now\" name=\"fstflags.mtim_now\"\u003e\u003c/a\u003e**`UVWASI_FILESTAT_SET_MTIM_NOW`**\n\n    Adjust the last data modification timestamp to the\n    time of clock [`UVWASI_CLOCK_REALTIME`](#clockid.realtime).\n\n### \u003ca href=\"#inode\" name=\"inode\"\u003e\u003c/a\u003e`uvwasi_inode_t` (`uint64_t`)\n\nFile serial number that is unique within its file system.\n\nUsed by [`uvwasi_dirent_t`](#dirent) and [`uvwasi_filestat_t`](#filestat).\n\n### \u003ca href=\"#iovec\" name=\"iovec\"\u003e\u003c/a\u003e`uvwasi_iovec_t` (`struct`)\n\nA region of memory for scatter/gather reads.\n\nUsed by [`uvwasi_fd_pread()`](#fd_pread), [`uvwasi_fd_read()`](#fd_read), and [`uvwasi_sock_recv()`](#sock_recv).\n\nMembers:\n\n- \u003ca href=\"#iovec.buf\" name=\"iovec.buf\"\u003e\u003c/a\u003e\u003ccode\u003evoid \\*\u003cstrong\u003ebuf\u003c/strong\u003e\u003c/code\u003e and \u003ca href=\"#iovec.buf_len\" name=\"iovec.buf_len\"\u003e\u003c/a\u003e\u003ccode\u003e\\_\\_wasi\\_size\\_t \u003cstrong\u003ebuf\\_len\u003c/strong\u003e\u003c/code\u003e\n\n    The address and length of the buffer to be filled.\n\n### \u003ca href=\"#linkcount\" name=\"linkcount\"\u003e\u003c/a\u003e`uvwasi_linkcount_t` (`uint64_t`)\n\nNumber of hard links to an inode.\n\nUsed by [`uvwasi_filestat_t`](#filestat).\n\n### \u003ca href=\"#lookupflags\" name=\"lookupflags\"\u003e\u003c/a\u003e`uvwasi_lookupflags_t` (`uint32_t` bitfield)\n\nFlags determining the method of how paths are resolved.\n\nUsed by [`uvwasi_path_filestat_get()`](#path_filestat_get), [`uvwasi_path_filestat_set_times()`](#path_filestat_set_times), [`uvwasi_path_link()`](#path_link), and [`uvwasi_path_open()`](#path_open).\n\nPossible values:\n\n- \u003ca href=\"#lookupflags.symlink_follow\" name=\"lookupflags.symlink_follow\"\u003e\u003c/a\u003e**`UVWASI_LOOKUP_SYMLINK_FOLLOW`**\n\n    As long as the resolved path corresponds to a symbolic\n    link, it is expanded.\n\n### \u003ca href=\"#oflags\" name=\"oflags\"\u003e\u003c/a\u003e`uvwasi_oflags_t` (`uint16_t` bitfield)\n\nOpen flags used by [`uvwasi_path_open()`](#path_open).\n\nUsed by [`uvwasi_path_open()`](#path_open).\n\nPossible values:\n\n- \u003ca href=\"#oflags.creat\" name=\"oflags.creat\"\u003e\u003c/a\u003e**`UVWASI_O_CREAT`**\n\n    Create file if it does not exist.\n\n- \u003ca href=\"#oflags.directory\" name=\"oflags.directory\"\u003e\u003c/a\u003e**`UVWASI_O_DIRECTORY`**\n\n    Fail if not a directory.\n\n- \u003ca href=\"#oflags.excl\" name=\"oflags.excl\"\u003e\u003c/a\u003e**`UVWASI_O_EXCL`**\n\n    Fail if file already exists.\n\n- \u003ca href=\"#oflags.trunc\" name=\"oflags.trunc\"\u003e\u003c/a\u003e**`UVWASI_O_TRUNC`**\n\n    Truncate file to size 0.\n\n### \u003ca href=\"#riflags\" name=\"riflags\"\u003e\u003c/a\u003e`uvwasi_riflags_t` (`uint16_t` bitfield)\n\nFlags provided to [`uvwasi_sock_recv()`](#sock_recv).\n\nUsed by [`uvwasi_sock_recv()`](#sock_recv).\n\nPossible values:\n\n- \u003ca href=\"#riflags.peek\" name=\"riflags.peek\"\u003e\u003c/a\u003e**`UVWASI_SOCK_RECV_PEEK`**\n\n    Returns the message without removing it from the\n    socket's receive queue.\n\n- \u003ca href=\"#riflags.waitall\" name=\"riflags.waitall\"\u003e\u003c/a\u003e**`UVWASI_SOCK_RECV_WAITALL`**\n\n    On byte-stream sockets, block until the full amount\n    of data can be returned.\n\n### \u003ca href=\"#rights\" name=\"rights\"\u003e\u003c/a\u003e`uvwasi_rights_t` (`uint64_t` bitfield)\n\nFile descriptor rights, determining which actions may be\nperformed.\n\nUsed by [`uvwasi_fdstat_t`](#fdstat), [`uvwasi_fd_fdstat_set_rights()`](#fd_fdstat_set_rights), and [`uvwasi_path_open()`](#path_open).\n\nPossible values:\n\n- \u003ca href=\"#rights.fd_datasync\" name=\"rights.fd_datasync\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_FD_DATASYNC`**\n\n    The right to invoke [`uvwasi_fd_datasync()`](#fd_datasync).\n\n    If [`UVWASI_RIGHT_PATH_OPEN`](#rights.path_open) is set, includes the right to\n    invoke [`uvwasi_path_open()`](#path_open) with [`UVWASI_FDFLAG_DSYNC`](#fdflags.dsync).\n\n- \u003ca href=\"#rights.fd_read\" name=\"rights.fd_read\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_FD_READ`**\n\n    The right to invoke [`uvwasi_fd_read()`](#fd_read) and [`uvwasi_sock_recv()`](#sock_recv).\n\n    If [`UVWASI_RIGHT_FD_SEEK`](#rights.fd_seek) is set, includes the right to invoke\n    [`uvwasi_fd_pread()`](#fd_pread).\n\n- \u003ca href=\"#rights.fd_seek\" name=\"rights.fd_seek\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_FD_SEEK`**\n\n    The right to invoke [`uvwasi_fd_seek()`](#fd_seek). This flag implies\n    [`UVWASI_RIGHT_FD_TELL`](#rights.fd_tell).\n\n- \u003ca href=\"#rights.fd_fdstat_set_flags\" name=\"rights.fd_fdstat_set_flags\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_FD_FDSTAT_SET_FLAGS`**\n\n    The right to invoke [`uvwasi_fd_fdstat_set_flags()`](#fd_fdstat_set_flags).\n\n- \u003ca href=\"#rights.fd_sync\" name=\"rights.fd_sync\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_FD_SYNC`**\n\n    The right to invoke [`uvwasi_fd_sync()`](#fd_sync).\n\n    If [`UVWASI_RIGHT_PATH_OPEN`](#rights.path_open) is set, includes the right to\n    invoke [`uvwasi_path_open()`](#path_open) with [`UVWASI_FDFLAG_RSYNC`](#fdflags.rsync) and\n    [`UVWASI_FDFLAG_DSYNC`](#fdflags.dsync).\n\n- \u003ca href=\"#rights.fd_tell\" name=\"rights.fd_tell\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_FD_TELL`**\n\n    The right to invoke [`uvwasi_fd_seek()`](#fd_seek) in such a way that the\n    file offset remains unaltered (i.e., [`UVWASI_WHENCE_CUR`](#whence.cur) with\n    offset zero), or to invoke [`uvwasi_fd_tell()`](#fd_tell).\n\n- \u003ca href=\"#rights.fd_write\" name=\"rights.fd_write\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_FD_WRITE`**\n\n    The right to invoke [`uvwasi_fd_write()`](#fd_write) and [`uvwasi_sock_send()`](#sock_send).\n\n    If [`UVWASI_RIGHT_FD_SEEK`](#rights.fd_seek) is set, includes the right to\n    invoke [`uvwasi_fd_pwrite()`](#fd_pwrite).\n\n- \u003ca href=\"#rights.fd_advise\" name=\"rights.fd_advise\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_FD_ADVISE`**\n\n    The right to invoke [`uvwasi_fd_advise()`](#fd_advise).\n\n- \u003ca href=\"#rights.fd_allocate\" name=\"rights.fd_allocate\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_FD_ALLOCATE`**\n\n    The right to invoke [`uvwasi_fd_allocate()`](#fd_allocate).\n\n- \u003ca href=\"#rights.path_create_directory\" name=\"rights.path_create_directory\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_PATH_CREATE_DIRECTORY`**\n\n    The right to invoke [`uvwasi_path_create_directory()`](#path_create_directory).\n\n- \u003ca href=\"#rights.path_create_file\" name=\"rights.path_create_file\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_PATH_CREATE_FILE`**\n\n    If [`UVWASI_RIGHT_PATH_OPEN`](#rights.path_open) is set, the right to invoke\n    [`uvwasi_path_open()`](#path_open) with [`UVWASI_O_CREAT`](#oflags.creat).\n\n- \u003ca href=\"#rights.path_link_source\" name=\"rights.path_link_source\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_PATH_LINK_SOURCE`**\n\n    The right to invoke [`uvwasi_path_link()`](#path_link) with the file\n    descriptor as the source directory.\n\n- \u003ca href=\"#rights.path_link_target\" name=\"rights.path_link_target\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_PATH_LINK_TARGET`**\n\n    The right to invoke [`uvwasi_path_link()`](#path_link) with the file\n    descriptor as the target directory.\n\n- \u003ca href=\"#rights.path_open\" name=\"rights.path_open\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_PATH_OPEN`**\n\n    The right to invoke [`uvwasi_path_open()`](#path_open).\n\n- \u003ca href=\"#rights.fd_readdir\" name=\"rights.fd_readdir\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_FD_READDIR`**\n\n    The right to invoke [`uvwasi_fd_readdir()`](#fd_readdir).\n\n- \u003ca href=\"#rights.path_readlink\" name=\"rights.path_readlink\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_PATH_READLINK`**\n\n    The right to invoke [`uvwasi_path_readlink()`](#path_readlink).\n\n- \u003ca href=\"#rights.path_rename_source\" name=\"rights.path_rename_source\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_PATH_RENAME_SOURCE`**\n\n    The right to invoke [`uvwasi_path_rename()`](#path_rename) with the file\n    descriptor as the source directory.\n\n- \u003ca href=\"#rights.path_rename_target\" name=\"rights.path_rename_target\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_PATH_RENAME_TARGET`**\n\n    The right to invoke [`uvwasi_path_rename()`](#path_rename) with the file\n    descriptor as the target directory.\n\n- \u003ca href=\"#rights.path_filestat_get\" name=\"rights.path_filestat_get\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_PATH_FILESTAT_GET`**\n\n    The right to invoke [`uvwasi_path_filestat_get()`](#path_filestat_get).\n\n- \u003ca href=\"#rights.path_filestat_set_size\" name=\"rights.path_filestat_set_size\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_PATH_FILESTAT_SET_SIZE`**\n\n    The right to change a file's size (there is no `uvwasi_path_filestat_set_size()`).\n\n    If [`UVWASI_RIGHT_PATH_OPEN`](#rights.path_open) is set, includes the right to\n    invoke [`uvwasi_path_open()`](#path_open) with [`UVWASI_O_TRUNC`](#oflags.trunc).\n\n- \u003ca href=\"#rights.path_filestat_set_times\" name=\"rights.path_filestat_set_times\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_PATH_FILESTAT_SET_TIMES`**\n\n    The right to invoke [`uvwasi_path_filestat_set_times()`](#path_filestat_set_times).\n\n- \u003ca href=\"#rights.fd_filestat_get\" name=\"rights.fd_filestat_get\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_FD_FILESTAT_GET`**\n\n    The right to invoke [`uvwasi_fd_filestat_get()`](#fd_filestat_get).\n\n- \u003ca href=\"#rights.fd_filestat_set_size\" name=\"rights.fd_filestat_set_size\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_FD_FILESTAT_SET_SIZE`**\n\n    The right to invoke [`uvwasi_fd_filestat_set_size()`](#fd_filestat_set_size).\n\n- \u003ca href=\"#rights.fd_filestat_set_times\" name=\"rights.fd_filestat_set_times\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_FD_FILESTAT_SET_TIMES`**\n\n    The right to invoke [`uvwasi_fd_filestat_set_times()`](#fd_filestat_set_times).\n\n- \u003ca href=\"#rights.path_symlink\" name=\"rights.path_symlink\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_PATH_SYMLINK`**\n\n    The right to invoke [`uvwasi_path_symlink()`](#path_symlink).\n\n- \u003ca href=\"#rights.path_unlink_file\" name=\"rights.path_unlink_file\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_PATH_UNLINK_FILE`**\n\n    The right to invoke [`uvwasi_path_unlink_file()`](#path_unlink_file).\n\n- \u003ca href=\"#rights.path_remove_directory\" name=\"rights.path_remove_directory\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_PATH_REMOVE_DIRECTORY`**\n\n    The right to invoke [`uvwasi_path_remove_directory()`](#path_remove_directory).\n\n- \u003ca href=\"#rights.poll_fd_readwrite\" name=\"rights.poll_fd_readwrite\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_POLL_FD_READWRITE`**\n\n    If [`UVWASI_RIGHT_FD_READ`](#rights.fd_read) is set, includes the right to\n    invoke [`uvwasi_poll_oneoff()`](#poll_oneoff) to subscribe to [`UVWASI_EVENTTYPE_FD_READ`](#eventtype.fd_read).\n\n    If [`UVWASI_RIGHT_FD_WRITE`](#rights.fd_write) is set, includes the right to\n    invoke [`uvwasi_poll_oneoff()`](#poll_oneoff) to subscribe to [`UVWASI_EVENTTYPE_FD_WRITE`](#eventtype.fd_write).\n\n- \u003ca href=\"#rights.sock_shutdown\" name=\"rights.sock_shutdown\"\u003e\u003c/a\u003e**`UVWASI_RIGHT_SOCK_SHUTDOWN`**\n\n    The right to invoke [`uvwasi_sock_shutdown()`](#sock_shutdown).\n\n### \u003ca href=\"#roflags\" name=\"roflags\"\u003e\u003c/a\u003e`uvwasi_roflags_t` (`uint16_t` bitfield)\n\nFlags returned by [`uvwasi_sock_recv()`](#sock_recv).\n\nUsed by [`uvwasi_sock_recv()`](#sock_recv).\n\nPossible values:\n\n- \u003ca href=\"#roflags.data_truncated\" name=\"roflags.data_truncated\"\u003e\u003c/a\u003e**`UVWASI_SOCK_RECV_DATA_TRUNCATED`**\n\n    Returned by [`uvwasi_sock_recv()`](#sock_recv): Message data has been\n    truncated.\n\n### \u003ca href=\"#sdflags\" name=\"sdflags\"\u003e\u003c/a\u003e`uvwasi_sdflags_t` (`uint8_t` bitfield)\n\nWhich channels on a socket to shut down.\n\nUsed by [`uvwasi_sock_shutdown()`](#sock_shutdown).\n\nPossible values:\n\n- \u003ca href=\"#sdflags.rd\" name=\"sdflags.rd\"\u003e\u003c/a\u003e**`UVWASI_SHUT_RD`**\n\n    Disables further receive operations.\n\n- \u003ca href=\"#sdflags.wr\" name=\"sdflags.wr\"\u003e\u003c/a\u003e**`UVWASI_SHUT_WR`**\n\n    Disables further send operations.\n\n### \u003ca href=\"#siflags\" name=\"siflags\"\u003e\u003c/a\u003e`uvwasi_siflags_t` (`uint16_t` bitfield)\n\nFlags provided to [`uvwasi_sock_send()`](#sock_send). As there are currently no flags\ndefined, it must be set to zero.\n\nUsed by [`uvwasi_sock_send()`](#sock_send).\n\n### \u003ca href=\"#signal\" name=\"signal\"\u003e\u003c/a\u003e`uvwasi_signal_t` (`uint8_t`)\n\nSignal condition.\n\nUsed by [`uvwasi_proc_raise()`](#proc_raise).\n\nPossible values:\n\n- \u003ca href=\"#signal.abrt\" name=\"signal.abrt\"\u003e\u003c/a\u003e**`UVWASI_SIGABRT`**\n\n    Process abort signal.\n\n    Action: Terminates the process.\n\n- \u003ca href=\"#signal.alrm\" name=\"signal.alrm\"\u003e\u003c/a\u003e**`UVWASI_SIGALRM`**\n\n    Alarm clock.\n\n    Action: Terminates the process.\n\n- \u003ca href=\"#signal.bus\" name=\"signal.bus\"\u003e\u003c/a\u003e**`UVWASI_SIGBUS`**\n\n    Access to an undefined portion of a memory object.\n\n    Action: Terminates the process.\n\n- \u003ca href=\"#signal.chld\" name=\"signal.chld\"\u003e\u003c/a\u003e**`UVWASI_SIGCHLD`**\n\n    Child process terminated, stopped, or continued.\n\n    Action: Ignored.\n\n- \u003ca href=\"#signal.cont\" name=\"signal.cont\"\u003e\u003c/a\u003e**`UVWASI_SIGCONT`**\n\n    Continue executing, if stopped.\n\n    Action: Continues executing, if stopped.\n\n- \u003ca href=\"#signal.fpe\" name=\"signal.fpe\"\u003e\u003c/a\u003e**`UVWASI_SIGFPE`**\n\n    Erroneous arithmetic operation.\n\n    Action: Terminates the process.\n\n- \u003ca href=\"#signal.hup\" name=\"signal.hup\"\u003e\u003c/a\u003e**`UVWASI_SIGHUP`**\n\n    Hangup.\n\n    Action: Terminates the process.\n\n- \u003ca href=\"#signal.ill\" name=\"signal.ill\"\u003e\u003c/a\u003e**`UVWASI_SIGILL`**\n\n    Illegal instruction.\n\n    Action: Terminates the process.\n\n- \u003ca href=\"#signal.int\" name=\"signal.int\"\u003e\u003c/a\u003e**`UVWASI_SIGINT`**\n\n    Terminate interrupt signal.\n\n    Action: Terminates the process.\n\n- \u003ca href=\"#signal.kill\" name=\"signal.kill\"\u003e\u003c/a\u003e**`UVWASI_SIGKILL`**\n\n    Kill.\n\n    Action: Terminates the process.\n\n- \u003ca href=\"#signal.pipe\" name=\"signal.pipe\"\u003e\u003c/a\u003e**`UVWASI_SIGPIPE`**\n\n    Write on a pipe with no one to read it.\n\n    Action: Ignored.\n\n- \u003ca href=\"#signal.quit\" name=\"signal.quit\"\u003e\u003c/a\u003e**`UVWASI_SIGQUIT`**\n\n    Terminal quit signal.\n\n    Action: Terminates the process.\n\n- \u003ca href=\"#signal.segv\" name=\"signal.segv\"\u003e\u003c/a\u003e**`UVWASI_SIGSEGV`**\n\n    Invalid memory reference.\n\n    Action: Terminates the process.\n\n- \u003ca href=\"#signal.stop\" name=\"signal.stop\"\u003e\u003c/a\u003e**`UVWASI_SIGSTOP`**\n\n    Stop executing.\n\n    Action: Stops executing.\n\n- \u003ca href=\"#signal.sys\" name=\"signal.sys\"\u003e\u003c/a\u003e**`UVWASI_SIGSYS`**\n\n    Bad system call.\n\n    Action: Terminates the process.\n\n- \u003ca href=\"#signal.term\" name=\"signal.term\"\u003e\u003c/a\u003e**`UVWASI_SIGTERM`**\n\n    Termination signal.\n\n    Action: Terminates the process.\n\n- \u003ca href=\"#signal.trap\" name=\"signal.trap\"\u003e\u003c/a\u003e**`UVWASI_SIGTRAP`**\n\n    Trace/breakpoint trap.\n\n    Action: Terminates the process.\n\n- \u003ca href=\"#signal.tstp\" name=\"signal.tstp\"\u003e\u003c/a\u003e**`UVWASI_SIGTSTP`**\n\n    Terminal stop signal.\n\n    Action: Stops executing.\n\n- \u003ca href=\"#signal.ttin\" name=\"signal.ttin\"\u003e\u003c/a\u003e**`UVWASI_SIGTTIN`**\n\n    Background process attempting read.\n\n    Action: Stops executing.\n\n- \u003ca href=\"#signal.ttou\" name=\"signal.ttou\"\u003e\u003c/a\u003e**`UVWASI_SIGTTOU`**\n\n    Background process attempting write.\n\n    Action: Stops executing.\n\n- \u003ca href=\"#signal.urg\" name=\"signal.urg\"\u003e\u003c/a\u003e**`UVWASI_SIGURG`**\n\n    High bandwidth data is available at a socket.\n\n    Action: Ignored.\n\n- \u003ca href=\"#signal.usr1\" name=\"signal.usr1\"\u003e\u003c/a\u003e**`UVWASI_SIGUSR1`**\n\n    User-defined signal 1.\n\n    Action: Terminates the process.\n\n- \u003ca href=\"#signal.usr2\" name=\"signal.usr2\"\u003e\u003c/a\u003e**`UVWASI_SIGUSR2`**\n\n    User-defined signal 2.\n\n    Action: Terminates the process.\n\n- \u003ca href=\"#signal.vtalrm\" name=\"signal.vtalrm\"\u003e\u003c/a\u003e**`UVWASI_SIGVTALRM`**\n\n    Virtual timer expired.\n\n    Action: Terminates the process.\n\n- \u003ca href=\"#signal.xcpu\" name=\"signal.xcpu\"\u003e\u003c/a\u003e**`UVWASI_SIGXCPU`**\n\n    CPU time limit exceeded.\n\n    Action: Terminates the process.\n\n- \u003ca href=\"#signal.xfsz\" name=\"signal.xfsz\"\u003e\u003c/a\u003e**`UVWASI_SIGXFSZ`**\n\n    File size limit exceeded.\n\n    Action: Terminates the process.\n\n### \u003ca href=\"#subclockflags\" name=\"subclockflags\"\u003e\u003c/a\u003e`uvwasi_subclockflags_t` (`uint16_t` bitfield)\n\nFlags determining how to interpret the timestamp provided in\n[`uvwasi_subscription_t::u.clock.timeout`](#subscription.u.clock.timeout).\n\nUsed by [`uvwasi_subscription_t`](#subscription).\n\nPossible values:\n\n- \u003ca href=\"#subclockflags.abstime\" name=\"subclockflags.abstime\"\u003e\u003c/a\u003e**`UVWASI_SUBSCRIPTION_CLOCK_ABSTIME`**\n\n    If set, treat the timestamp provided in\n    [`uvwasi_subscription_t::u.clock.timeout`](#subscription.u.clock.timeout) as an absolute timestamp\n    of clock [`uvwasi_subscription_t::u.clock.clock_id`](#subscription.u.clock.clock_id).\n\n    If clear, treat the timestamp provided in\n    [`uvwasi_subscription_t::u.clock.timeout`](#subscription.u.clock.timeout) relative to the current\n    time value of clock [`uvwasi_subscription_t::u.clock.clock_id`](#subscription.u.clock.clock_id).\n\n### \u003ca href=\"#subscription\" name=\"subscription\"\u003e\u003c/a\u003e`uvwasi_subscription_t` (`struct`)\n\nSubscription to an event.\n\nUsed by [`uvwasi_poll_oneoff()`](#poll_oneoff).\n\nMembers:\n\n- \u003ca href=\"#subscription.userdata\" name=\"subscription.userdata\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_userdata\\_t](#userdata) \u003cstrong\u003euserdata\u003c/strong\u003e\u003c/code\u003e\n\n    User-provided value that is attached to the subscription in the\n    implementation and returned through\n    [`uvwasi_event_t::userdata`](#event.userdata).\n\n- \u003ca href=\"#subscription.type\" name=\"subscription.type\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_eventtype\\_t](#eventtype) \u003cstrong\u003etype\u003c/strong\u003e\u003c/code\u003e\n\n    The type of the event to which to subscribe.\n\n- When `type` is [`UVWASI_EVENTTYPE_CLOCK`](#eventtype.u.clock):\n\n    - \u003ca href=\"#subscription.u.clock\" name=\"subscription.u.clock\"\u003e\u003c/a\u003e**`u.clock`**\n\n        - \u003ca href=\"#subscription.u.clock.clock_id\" name=\"subscription.u.clock.clock_id\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_clockid\\_t](#clockid) \u003cstrong\u003eclock\\_id\u003c/strong\u003e\u003c/code\u003e\n\n            The clock against which to compare the timestamp.\n\n        - \u003ca href=\"#subscription.u.clock.timeout\" name=\"subscription.u.clock.timeout\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_timestamp\\_t](#timestamp) \u003cstrong\u003etimeout\u003c/strong\u003e\u003c/code\u003e\n\n            The absolute or relative timestamp.\n\n        - \u003ca href=\"#subscription.u.clock.precision\" name=\"subscription.u.clock.precision\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_timestamp\\_t](#timestamp) \u003cstrong\u003eprecision\u003c/strong\u003e\u003c/code\u003e\n\n            The amount of time that the implementation may wait additionally\n            to coalesce with other events.\n\n        - \u003ca href=\"#subscription.u.clock.flags\" name=\"subscription.u.clock.flags\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_subclockflags\\_t](#subclockflags) \u003cstrong\u003eflags\u003c/strong\u003e\u003c/code\u003e\n\n            Flags specifying whether the timeout is absolute or relative.\n\n- When `type` is [`UVWASI_EVENTTYPE_FD_READ`](#eventtype.fd_read) or [`UVWASI_EVENTTYPE_FD_WRITE`](#eventtype.fd_write):\n\n    - \u003ca href=\"#subscription.u.fd_readwrite\" name=\"subscription.u.fd_readwrite\"\u003e\u003c/a\u003e**`u.fd_readwrite`**\n\n        - \u003ca href=\"#subscription.u.fd_readwrite.fd\" name=\"subscription.u.fd_readwrite.fd\"\u003e\u003c/a\u003e\u003ccode\u003e[\\_\\_wasi\\_fd\\_t](#fd) \u003cstrong\u003efd\u003c/strong\u003e\u003c/code\u003e\n\n            The file descriptor on which to wait for it to become ready\n            for reading or writing.\n\n### \u003ca href=\"#timestamp\" name=\"timestamp\"\u003e\u003c/a\u003e`uvwasi_timestamp_t` (`uint64_t`)\n\nTimestamp in nanoseconds.\n\nUsed by [`uvwasi_filestat_t`](#filestat), [`uvwasi_subscription_t`](#subscription), [`uvwasi_clock_res_get()`](#clock_res_get), [`uvwasi_clock_time_get()`](#clock_time_get), [`uvwasi_fd_filestat_set_times()`](#fd_filestat_set_times), and [`uvwasi_path_filestat_set_times()`](#path_filestat_set_times).\n\n### \u003ca href=\"#userdata\" name=\"userdata\"\u003e\u003c/a\u003e`uvwasi_userdata_t` (`uint64_t`)\n\nUser-provided value that may be attached to objects that is\nretained when extracted from the implementation.\n\nUsed by [`uvwasi_event_t`](#event) and [`uvwasi_subscription_t`](#subscription).\n\n### \u003ca href=\"#whence\" name=\"whence\"\u003e\u003c/a\u003e`uvwasi_whence_t` (`uint8_t`)\n\nThe position relative to which to set the offset of the file descriptor.\n\nUsed by [`uvwasi_fd_seek()`](#fd_seek).\n\nPossible values:\n\n- \u003ca href=\"#whence.cur\" name=\"whence.cur\"\u003e\u003c/a\u003e**`UVWASI_WHENCE_CUR`**\n\n    Seek relative to current position.\n\n- \u003ca href=\"#whence.end\" name=\"whence.end\"\u003e\u003c/a\u003e**`UVWASI_WHENCE_END`**\n\n    Seek relative to end-of-file.\n\n- \u003ca href=\"#whence.set\" name=\"whence.set\"\u003e\u003c/a\u003e**`UVWASI_WHENCE_SET`**\n\n    Seek relative to start-of-file.\n\n## Doing a release\n\nTo do a release complete the following steps:\n\n* Look at the list of changes - https://github.com/nodejs/uvwasi/commits/main.\n* Put together a list of notable changes.\n  See https://github.com/nodejs/uvwasi/releases/tag/v0.0.14\n  or any of the other releases for example. Use that list in the release commit,\n  the GitHub release, and the PR to update uvwasi in Node.js (or any other\n  projects where you update it)\n* Update the version in the CMake file. Specifically: https://github.com/nodejs/uvwasi/blob/main/CMakeLists.txt#L5\n* Create a release commit. This should just involve changing one line and\n  adding the notable changes. See\n  https://github.com/nodejs/uvwasi/commit/6ad5fc996420d0e4e75983ce3deb65f327321f33\n  as an example.\n* PR the release commit. Once it lands, create a GitHub release with\n  the same notable changes. When doing the GitHub release you will need to select\n  `Choose a tag` and type in the new tag. That should result in \n  ` Create new tag: vX.Y.Z on publish` where vX.Y.Z matches the tag you specified.\n* Update uvwasi in Node.js or any projects you want to update - there are several\n  other projects that use uvwasi.\n\n## Running fuzzers locally\n\nWe support fuzzing by way of [ClusterFuzzLite](https://google.github.io/clusterfuzzlite/),\nwhich is run automatically against pull requests. You can run these fuzzers\nlocally with the [OSS-Fuzz](https://github.com/google/oss-fuzz)  fuzzing\ninfrastructure, using the following steps:\n\n```sh\ngit clone https://github.com/google/oss-fuzz\ngit clone https://github.com/nodejs/uvwasi\ncd uvwasi\n\n# Build the fuzzers in .clusterfuzzlite\npython3 ../oss-fuzz/infra/helper.py build_fuzzers --external $PWD\n\n# Run the fuzzer for 10 seconds\npython3 ../oss-fuzz/infra/helper.py run_fuzzer --external $PWD fuzz_normalize_path -- -max_total_time=10\n```\n\n\n[WASI]: https://github.com/WebAssembly/WASI\n[libuv]: https://github.com/libuv/libuv\n[preview 1]: https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodejs%2Fuvwasi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodejs%2Fuvwasi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodejs%2Fuvwasi/lists"}