2 ms·
I 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 thr
by jeroenhd 4y ago
I 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.