Ideas on Glitching in Rust
12 hours ago
- #Error Handling
- #Rust
- #Software Stability
- Tritium aims for stability in desktop drafting, leveraging Rust's borrow-checker to avoid memory corruption.
- Avoiding crashes and data corruption is key, with strategies like 'Don't Panic' and limiting recursion.
- In debug mode, capturing stack traces helps debug issues without needing replication.
- A macro 'panic_or_return' is used to handle unexpected states gracefully in release builds, allowing the program to continue running.
- Recursion in layout code is bounded to prevent stack overflow, with debug builds panicking and release builds truncating to a set limit.