Skip to content

Commit

Permalink
Augment README
Browse files Browse the repository at this point in the history
  • Loading branch information
surma committed Sep 9, 2019
1 parent ba6e5df commit 982bc2b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ All detectors return a `Promise<bool>`.
| `tailCall()` | [Tail call](https://github.com/webassembly/tail-call) |
| `threads()` | [Threads](https://github.com/webassembly/threads) |

## Why are all the tests async?

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.

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!

[ff coop]: https://groups.google.com/forum/#!msg/mozilla.dev.platform/IHkBZlHETpA/dwsMNchWEQAJ

---

License Apache-2.0

0 comments on commit 982bc2b

Please sign in to comment.