Skip to content

Commit 982bc2b

Browse files
committed
Augment README
1 parent ba6e5df commit 982bc2b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ All detectors return a `Promise<bool>`.
5050
| `tailCall()` | [Tail call](https://github.com/webassembly/tail-call) |
5151
| `threads()` | [Threads](https://github.com/webassembly/threads) |
5252

53+
## Why are all the tests async?
54+
55+
The _technical_ reason is that some tests might have to be augmented to be asynchronous in the future. For example, Firefox is planning to [make a change][ff coop] that would require a `postMessage` call to detect SABs, which are required for threads.
56+
57+
The _other_ reason is that you _should_ be using `WebAssembly.compile`, `WebAssembly.instantiate`, or their streaming versions `WebAssembly.compileStreaming` and `WebAssembly.instantiateStreaming`, which are all asynchronous. You should already be prepared for asynchronous code when using WebAssembly!
58+
59+
[ff coop]: https://groups.google.com/forum/#!msg/mozilla.dev.platform/IHkBZlHETpA/dwsMNchWEQAJ
60+
5361
---
5462

5563
License Apache-2.0

0 commit comments

Comments
 (0)