Rust the Process
4 months ago
- #Rust
- #Systems Programming
- #Programming
- The author shares their journey of learning Rust after years of struggling with it, initially by reading 'The Rust Programming Language' but finding more success through hands-on practice.
- Their background in C++ from college and work at SpaceX and the Michigan Solar Car team influenced their programming skills, but they decided to give Rust another try due to its growing popularity in the systems programming ecosystem.
- They started with 'rustlings' for syntax and basic patterns but wanted a real project, leading them to 'Raytracing in One Weekend,' which provided visible and instant feedback.
- Inspired by Terminal UI (TUI) programs like htop and k9s, they began working on a TUI for OpenSnitch, a Linux firewall tool, using Rust and gRPC.
- They faced challenges with Rust's borrow checker and async programming but found solutions through learning about interior mutability and shared state patterns.
- The author appreciates Rust's enums with associated data, error handling philosophy, and built-in tooling for testing and formatting.
- They reflect on the trade-offs between Rust and C/C++, noting Rust's safety features but also its learning curve and occasional opacity in memory management.
- The author avoided using LLMs for most of the development to maximize learning, only using them for specific complex issues.
- They conclude that Rust is a strong choice for greenfield projects but acknowledge organizational and educational factors that might influence language adoption.
- The author encourages others to 'trust the process' of learning Rust, sharing their satisfaction with building the OpenSnitch TUI and their newfound comfort with the language.