Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGus Caplan <me@gus.host>2020-06-25 03:45:03 +0300
committerGus Caplan <me@gus.host>2020-06-29 17:52:09 +0300
commit9e135accbb045d52eb65de602c81b5090daae1c4 (patch)
tree858e2e59ab2b45075eef747e1a3491e0b1dcd24e /doc/api/wasi.md
parentda8a1ef21b34af25c31cab5cf2cf023b66abe413 (diff)
wasi: add reactor support
PR-URL: https://github.com/nodejs/node/pull/34046 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'doc/api/wasi.md')
-rw-r--r--doc/api/wasi.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/api/wasi.md b/doc/api/wasi.md
index 46673af9e7f..9fe004ea599 100644
--- a/doc/api/wasi.md
+++ b/doc/api/wasi.md
@@ -132,6 +132,23 @@ Attempt to begin execution of `instance` as a WASI command by invoking its
If `start()` is called more than once, an exception is thrown.
+### `wasi.initialize(instance)`
+<!-- YAML
+added:
+ - REPLACEME
+-->
+
+* `instance` {WebAssembly.Instance}
+
+Attempt to initialize `instance` as a WASI reactor by invoking its
+`_initialize()` export, if it is present. If `instance` contains a `_start()`
+export, then an exception is thrown.
+
+`initialize()` requires that `instance` exports a [`WebAssembly.Memory`][] named
+`memory`. If `instance` does not have a `memory` export an exception is thrown.
+
+If `initialize()` is called more than once, an exception is thrown.
+
### `wasi.wasiImport`
<!-- YAML
added: