Skip to content

Commit 9f6136d

Browse files
nicolo-ribaudolittledan
authored andcommitted
Remove top-level await mention from docs
1 parent a62b540 commit 9f6136d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

proposals/esm-integration/README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function incrementCount() {
5757
export {count, incrementCount};
5858
```
5959

60-
WebAssembly modules currently can't take part in these graphs. This means that developers who want to use WebAssembly modules have to manually use the WebAssembly JS API. However, the API to compile and instantiate a WebAssembly module is asynchronous, so without [top-level await](https://github.com/tc39/proposal-top-level-await), it's not possible to export things which came out of WebAssembly module instantiation, in a way that's available to importers when the import completes.
60+
WebAssembly modules currently can't take part in these graphs. This means that developers who want to use WebAssembly modules have to manually use the WebAssembly JS API. However, the recommended API to compile and instantiate a WebAssembly module is asynchronous, so without [top-level await](https://github.com/tc39/proposal-top-level-await), it's not possible to export things which came out of WebAssembly module instantiation, in a way that's available to importers when the import completes.
6161

6262
### Unify various WebAssembly module implementations
6363

@@ -183,12 +183,6 @@ When a WebAssembly module imports a Global, there are two possible modes of oper
183183
- If the Global type is immutable (as declared in the importing module), then the exporting module may either export a numeric value or an immutable Global.
184184
- If the Global type is mutable, then the exporting module must export a mutable Global. The snapshot here is "shallow" in the sense that modifications *within* this particular mutable Global object *will* be visible in the importing module (but, if the exporting module overwrites the entire binding with some unrelated value, this will not be noticed by the importing module).
185185

186-
### Why does this proposal depend on top-level await?
187-
188-
On some platforms, some compilation work may need to happen when instantiating the module, rather than when parsing it, based on the dynamic values of the imports. For example, if a module imports Memory, there may be different instructions generated for different kinds of memory, with the choice made based on what's dynamically available.
189-
190-
Instantiating a WebAssembly module may take a significant amount of time, as it may involve expensive compilation work. For this reason, at some point during evaluation of a WebAssembly module, control is yielded to the event loop, to not block up the main thread. This yield uses the infrastructure of [the TC39 top-level await proposal](https://github.com/tc39/proposal-top-level-await).
191-
192186
### Can Web APIs be imported via modules?
193187

194188
In general, Web APIs are exposed through properties of the JavaScript global object, and are not available through ES Modules. See [this WebIDL](https://github.com/heycam/webidl/issues/676) issue for some early discussion about exposing Web APIs through modules.

0 commit comments

Comments
 (0)