Make sure all file extensions for wasm are correct
Per this comment, we only emit .js for bin targets, it's not clear what we emit for dylib, cdylib, and staticlib, but it seems likely they are incorrect.
I think .a is probably right for staticlib that is going to be run through emcc, but maybe dylibs should be .js.
I think the dylib story will depend on how dynamic linking for WebAssembly works. Here is some thinking on the issue, but I don't think it's official or complete yet: https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md
Eric Holk at 2017-05-02 00:06:38
Triage: i have no idea if this was done or not.
Steve Klabnik at 2019-12-12 13:33:37
AFAIK, the dynamic linking story for WebAssembly is still a WIP, so I wouldn't expect rustc to be able to produce WebAssembly dynamic libraries. On the other hand, I assume that once these library types are supported, their extensions will all match the standard Linux extensions, so I'm not sure this issue is still important to have around.
Thomas Lively at 2020-01-09 22:45:12