2 ms·
Okay, if we only care about render performance, rust/webasm is kind of comparable to native js frameworks. Now: What is compile times for real-world medium to
by cabirum 3y ago
Okay, if we only care about render performance, rust/webasm is kind of comparable to native js frameworks.
Now:
What is compile times for real-world medium to large projects? Do these even exist? Rust is infamous for its compile times, and frontend dev often requires live reload on every change.
What does debugging look like? Can I set a breakpoint in rust code in my IDE? What do I see in browser devtools? Can I change values in my paused code at runtime, then resume execution?
- jeroenhd 3y agoI don't know how much the Rust dev tools have advanced for browser debuggers specifically, but source code maps allow just about any language to be debugged through the standard browser debugger. You're limited by the browser debugger of course (no time traveling debugger like in real Visual Studio) but it works well enough that it felt like debugging Javascript. This article from 2½ years ago shows what was already possible back then when you're debugging C++: https://developer.chrome.com/blog/wasm-debugging-2020/ https://developer.chrome.com/blog/wasm-debugging-2020/ Rust build times are huge at first, especially if you haven't downloaded any dependencies before, (comparable to running npm install) but incremental compilation makes small code changes very quick and easy. Having worked on a Javascript code base that's grown over a few years, I don't believe Javascript is any faster than Rust when it comes to compilation/transcription/packaging, especially when you need to add a layer like TypeScript between your tools and yourself if you don't want to go insane with JS' lack of typing. I wouldn't use Rust for a browser frontend, but I don't think the lack of tooling is a very good reason not to. The massive size of WASM binaries, the overhead, the lack of transparency, and all the other problems are, though. I'd stick with Rust on the backend instead.