There's already a plan to give WebAssembly direct access to DOM, and to any other API JavaScript would have access to, without needing a JavaScript shim. (This requires integration between WebAssembly and the JavaScript garbage collector, which is part of why it's taking time to develop.)
Can such a thing even exist?
I think we'd better install wasm libraries (both language-specific and language-agnostic) like we install browser extensions.
Yes, cross-language code sharing is being worked on.
> I think we'd better install wasm libraries (both language-specific and language-agnostic) like we install browser extensions.
How would a site know what libraries are available? How would versioning work?
This is a caching problem, best solved at the normal browser resource cache level IMO.