Re:Get Started with Rust, WebAssembly, and Webpack
by Matthias247 on Tuesday June 27, 2017 @01:57PM
(#14647635)
Sure. But I think a better way would be a separate build tool and step, which generates the javascript proxy functions. With that way you get code completions and type checking for the remaining javascript/typescript, if the loader does everything dynamically you are more likely dynamically typed.
This seems like there could be even more stuff automated.
Because Rust is statically typed, a rust-loader could "overload" import() so it initialises and extracts the exported/non-mangled function signatures and create the JS equivalents automatically.