Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dario-piotrowicz/cloudflare-workers-webassembly-support-test
https://github.com/dario-piotrowicz/cloudflare-workers-webassembly-support-test
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dario-piotrowicz/cloudflare-workers-webassembly-support-test
- Owner: dario-piotrowicz
- Created: 2024-05-05T18:19:33.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-05T18:21:05.000Z (6 months ago)
- Last Synced: 2024-05-05T19:31:32.986Z (6 months ago)
- Language: JavaScript
- Size: 735 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cloudflare Workers - `WebAssembly` support test
Quick test to see what instantiation methods are supported by workerd (/Cloudflare workers)
> Note: check the git history so see the manual checks I did
## Results
| Method | Variant | Works |
|------------------------------------|-------------------------------|--------|
| `WebAssembly.instantiate` | with already-compiled modules | ✅ Yes |
| `WebAssembly.instantiate` | with binary code | ❌ No |
| `WebAssembly.instantiateStreaming` | | ❌ No |
| `WebAssembly.compile` | | ❌ No |
| `WebAssembly.compileStreaming` | | ❌ No |## Errors
Although the results above are expected, I noticed that workerd provides a valid error message for `instantiate` and `compile`:
![code generation disallowed error](./code-generation-disallowed.png)However `instantiateStreaming` and `compileStreaming` provide type errors which seem incorrect to me (and that they should be aligned with the above):
![code generation disallowed error](./instantiateStreaming-not-a-function.png)
![code generation disallowed error](./compileStreaming-not-a-function.png)