Get the latest tech news
Rust and WASM for Form Validation
For a very long time, the Rust WASM story wasn't entirely clear to me. In order to use WASM from Rust you had to use Node, Webpack, and all that jazz. This always turned me off using WebAssembly because it felt too heavy of a toolchain to get going. These days, things are much, much better.
With just a handful lines of code we can get access to an incredibly powerful language embedded in our otherwise extremely simple web page. WASM is still relatively heavy, compared to the equivalent JS that would’ve accomplished the same (20KB or so vs a few hundred bytes), but this is also an extremely contrived example case. We’ve built a simple web app that uses Rust for both backend and frontend logic, all powered by Rocket and WebAssembly.
Or read this on Hacker News