@derekdreery, have you found stdweb yet? I think its exactly what you're after. It just recently gained support for wasm32-unknown-unknown
(before it required emscripten). It's using a slightly different approach - the bindings are written manually using the help of an inline js!
macro, so many APIs will be missing at the moment, but its rather trivial to add the ones you need.
Or perhaps you could try and integrate your work with IDL into stdweb, so we can write new bindings more effectively. That would be awesome.
Regarding @NohatCoder's statement on performance:
Webassembly runs in a browser, and it is faster than JavaScript. The combination of those two features is the only reason why anyone should consider using it for anything at all.
I really don't think that performance is the only reason to use WebAssembly. Yes, it is true that accessing the DOM right now involves going through a JS FFI, but that is not always going to be the case. There is currently a proposal for GC support in WASM, which would enable direct access to web APIs. Once this is implemented, I imagine stdweb
could transition to using the new direct interface under-the-hood, whilst keeping the same API for Rust developers.
Anyway, personally I agree with @derekdreery, that the increased developer productivity from using a language such as Rust with a strong and flexible type system (eg: ADTs, traits, specialisation etc..) can be worthwhile in itself, and the ability to write both the client and server in the same language (like Node, except both languages would be Rust), is equally enticing.
Perhaps if I were writing a large app for a major company which had to be deployed and working in a month, I would stick to existing frameworks and technologies, but I see no reason to discourage innovation in this area because I think the future of the Web will be one where JavaScript is just one option out of many (Kotlin, Rust, OCaml, Haskell, etc...)