Skip to content

Commit

Permalink
Add application/wasm Web Assembly mime type
Browse files Browse the repository at this point in the history
This adds the application/wasm mime type, which is used to represent
compiled Web Assembly files, and registers it with the associated file
extension, .wasm.

While this isn't a registered standard, it's a widely recognized
mimetype, and is the one officially set out by the WASM committee and
current JavaScript standards.

It's concretely useful to use this mimetype, as it enables use of the
"WebAssembly.instantiateStreaming" browser API.

References:

https://webassembly.github.io/spec/core/binary/conventions.html
 - the webassembly document recommending application/wasm

WebAssembly/spec#573
 - progress on getting this registered as an official mimetype

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiateStreaming#Instantiating_streaming
 - JS API which requires the application/wasm mimetype to function
  • Loading branch information
daboross committed Jan 4, 2021
1 parent b99fd3a commit 4b3a407
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bin/tools/mime.types
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,7 @@ application/vnd.zul zir zirz
application/vnd.zzazz.deck+xml zaz
application/voicexml+xml vxml
# application/vq-rtcpxr
application/wasm wasm
# application/watcherinfo+xml
# application/whoispp-query
# application/whoispp-response
Expand Down

0 comments on commit 4b3a407

Please sign in to comment.