mirror of
https://github.com/denoland/deno.git
synced 2025-10-05 00:20:24 +00:00
feat: enable WebAssembly.instantiateStreaming and wasm async compilation (#11200)
The WebAssembly streaming APIs used to be enabled, but used to take buffer sources as their first argument (see #6154 and #7259). This change re-enables them, requiring a Promise<Response> instead, as well as enabling asynchronous compilation of WebAssembly modules.
This commit is contained in:
parent
7ef0f43d87
commit
ffa75be480
10 changed files with 351 additions and 24 deletions
|
|
@ -948,6 +948,8 @@ fn custom_headers(p: &str, body: Vec<u8>) -> Response<Body> {
|
|||
Some("application/javascript")
|
||||
} else if p.ends_with(".json") {
|
||||
Some("application/json")
|
||||
} else if p.ends_with(".wasm") {
|
||||
Some("application/wasm")
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue