News for hackers. Stuff that matters.
Re:Speeding up the Rust edit-build-run cycle by Animats on Thursday November 14, 2024 @03:55PM (#42141110)
The only time I use a debugger with Rust is when unsafe code in some library crate messes up. My own code has no "unsafe". I have debug symbols on and a panic catcher that displays a backtrace in a popup window. That covers most cases.

Rust development is mostly fixing compile errors, anyway. Once it compiles, it often works the first time. What matters is compile time for error compiles, which is pretty good.

Incremental compile time for my metaverse client is 1 minute 8 seconds in release mode. That's OK. Takes longer to test a new version.

Re:Speeding up the Rust edit-build-run cycle by flohofwoe on Friday November 15, 2024 @03:14AM (#42144866)
Debuggers are not only useful for actual debugging as in 'finding and fixing bugs', they are basically interactive program state explorers. Also "once it compiles, it works" is true for every programming language unless you're a complete newbie. The interesting bugs usually only manifest after your code is hammered by actual users and/or realworld data.
Re:Speeding up the Rust edit-build-run cycle by pepa65 on Friday November 15, 2024 @05:55AM (#42145730)
You're obviously not a Rust programmer.
Re:Speeding up the Rust edit-build-run cycle by flohofwoe on Friday November 15, 2024 @07:19AM (#42146233)
Rust only protects from a very small subset of bugs (memory corruption issues and data races) but not from logic bugs which are far more common.
Re:Speeding up the Rust edit-build-run cycle by Animats on Friday November 15, 2024 @04:30PM (#42151334)
Rust protects against undefined behavior. This is enough that programs either panic in a well-defined way, or continue to run well enough that logging works.
Re:Speeding up the Rust edit-build-run cycle by flohofwoe on Saturday November 16, 2024 @05:54AM (#42155768)
Not having UB isn't exactly unique to Rust though (Rust does have some UB btw it's just not as easy to encounter as in C or C++).