diff options
author | Gus Caplan <me@gus.host> | 2020-06-25 03:45:03 +0300 |
---|---|---|
committer | Gus Caplan <me@gus.host> | 2020-06-29 17:52:09 +0300 |
commit | 9e135accbb045d52eb65de602c81b5090daae1c4 (patch) | |
tree | 858e2e59ab2b45075eef747e1a3491e0b1dcd24e /doc/api/wasi.md | |
parent | da8a1ef21b34af25c31cab5cf2cf023b66abe413 (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.md | 17 |
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: |