-
Notifications
You must be signed in to change notification settings - Fork 695
Register .wasm as application/wasm in www.iana.org #1202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I believe @flagxor did this last year: https://github.com/WebAssembly/meetings/blob/f6705a7fc135271700ff1fb5d1ca0637893723bf/2017/WG-10-23.md#mime-type-for-wasm It was also discussed here: WebAssembly/spec#583 |
@jfbastien Thanks for the infomation. I did read that meeting note (and that particular section) when it was published on Github, but I totally forgot about it until you resurfaced it. What is the current status of the registration? |
Hi! Any updates on adding .wasm files to IANA? |
I haven't followed this topic closely, but it seems like the current status is this:
The process for provisional registrations is described in rfc6838 here. The w3 process is described here: Register an Internet Media Type for a W3C Spec. It seems that to advance the process we'll have to proceed to Candidate Recommendation with the WebAssembly specification. @ericprud: is there more we need to do before this? I'm unsure about where the Registration Section as described in step 2 of the w3 process is located. @flagxor do you have a copy of/link to this? I assume this was required to get provisional status. |
FWIW, it's also in various other shared MIME dbs, including the one used by GitHub Pages. |
When we register, I'll send a PR to pull |
Any updates on this? IANA Media Types were Last Updated 2019-07-11 |
Now that we're on CR, we can do this any time. I'm on vacation for the next week. After that, I'll see when the next W3C/IESG meeting is. Feel free to ping me if I forget. |
Any updates on this? IANA Media Types were Last Updated 2019-10-16 |
What about WAT for text and WAB for binary? |
@plehegar, can we add this registration as an appendix to WebAPI so it will be where folks will look for it? I don't see it as changing the specification (the spec has prescribed @ALL, In the registration template below, I went with @verbessern's proposal for the .wab file extension (leaving room for a future .wat registration). Is there any legacy file extension we should conform to? Note that mime-db uses '.wasm'. @lukewagner, what's your suggestion? Type name: application |
Looks like emscripten also uses .wasm |
The WebAssembly spec says
And indeed,
(Edited - added more projects -- thanks @Pauan!) |
If that will be made properly, now is the time, later will be over. The .wasm obviously is dictated by the desire to extend the .asm files, but the binary forms there, are many (.exe, .dll, .so, ...). Mistakes must be fixed, not be used for a base. The standard should be corrected, and be proper. There will be many other implementations in the future, and uncountable files in the wild. I think that having .wasm and .wat file is far worse (they are even a different length), then .wab and .wat. I expect that they will be a very common file formats in the future. Three letters per extension is descriptive enough. |
How it will be served (MIME) is another topic. I find no excessive reason to be different from "application/wab", but It could be served as "application/web-assembly-binary" as is "application/java-archive" for example for .jar. In a similar way and for the text format. This abbreviation 'wa?' defines a common namespace for the extensions. |
The existance of .wasm, does not prevent to have an explicit "split" to .wab and .wat, that could enter in the subsequent versions of the specs. The .wasm extension does not clearly indicate the internal structure of the file, when the binary and the text format are defined to be equivalent. |
@verbessern I don't think .wab is a good idea or realistic at this point. .wasm is already established in the ecosystem, it's very recognizable as related to WebAssembly, and WebAssembly text files are going to be very rare compared to the binary files since end-users never see them and most developers in the space will be working with tools that output straight to binary files, so it doesn't seem worth it to change .wasm for a closer parallel with .wat. |
That could be true, for the amount of end user files, but I think that this is not a reason, to mess up the extensions to .wasm and .wast (as its also already available around). This sounds like, because the .obj files used by some C++ compilers are not usually available for the end user, to call them .asmo. I don't think also that .wasm is "estabilished". That there are few implementations available, does not make it established. It will be established after years to come. The extension is not even yet registered (and so we are here). |
@sunfishcode In addition to that, @verbessern You seem to think that That's it, that's the reason. It would be very strange to call it "Wasm" in speech but have the In addition, |
It is the official shorthand, but it does have 2 different representations when serialized, that I think should be unified as stated above with a common prefix: .wa . I don't find a strong relation from the shorthand name and the extension(s?). I do think that the name is influenced by the assembly itself: https://en.wikipedia.org/wiki/Assembly_language, and then the extension is kept to clearly describe that relation: wasm. |
ps. I do think also, that the developers had to use something, because they worked on the implementations. It does not imply that all of them wanted to, or approve it. So this kind of an argument is a little foggy. |
@verbessern The extension is not ambiguous (as I already explained), 4 characters is not particularly long, it matches with the name of WebAssembly, it has always been the official recommendation (it's in the spec), and it is widely used by all tooling. You seem to want to make the text format "equal" to the binary format, but they are not equal. The binary format is the standard format. It is what is used in production. It is what is used in 99+% of uses of wasm. The text format is a supplement used for debugging, teaching, etc. You should not be shipping You also keep claiming that You also keep mentioning a |
Not to stray off topic here, but most libraries in the ecosystem also mention how to configure the web server to serve the mimetype. Frameworks such as Spring tend to get their list of MIME types from web servers like Apache (albeit the ultimate authority is IANA). Apache on the other hand is waiting on this issue to be resolved https://bz.apache.org/bugzilla/show_bug.cgi?id=63162 |
Alright. It seems you are not reading carefully.
I can agree that .wasm is more descriptive, but its questionable is that enough for a file extension, that breaks other "properties" as described above. And some purely cosmetic property: It is also harder to pronounce then .wab. |
The most important point, as made by @sunfishcode, is that all existing tools and documentation are using @verbessern the people disagreeing with your position are not misreading your arguments. We just don't think they tip the scales. If the Web can survive You talk of |
Alright, I felt a desire to contribute to the issue with some arguments. Please decide what ever is best. ps. is that the purpose or not does not change the fact that these are two serialization formats. After they are defined as equivalent, each of them could be used by an implementation. |
@ericprud (Sorry for slow reply.) Definitely agreed with @sunfishcode @conrad-watt et al on sticking with |
@ericprud In addition to the file extension, here are a few other things we can fill in:
WebAssembly is growing in non-Web spaces too, so it would nice to list runtime systems (in the sense described here) here as well.
The binary format starts with the bytes 0x00 0x61 0x73 0x6D. |
With apologies to @verbessern, it does seem that consensus is that the deployed extension is @sunfishcode, I believe you intend this text:
, and tx for the magic no. |
@ericprud Yes, that wording looks good, thanks! |
Can this be resolved? WebAssembly/spec#573 (comment) https://www.iana.org/assignments/media-types/application/wasm |
WebAssembly.{compile,instantiate}Streaming
requires mime type ofapplication/wasm
. Many people usepython -m http.server
to serve and test WebAssembly locally but CPython does not know.wasm
file extension (yet).To add
.wasm
type to CPython'smimetypes
module, CPython requires the extension to be registered in www.iana.org first (see mimetypes.py). Can someone from the WebAssembly group do the registration work?The text was updated successfully, but these errors were encountered: