Art’s Substack • 19 implied HN points • 15 May 24
- In Rust, errors are typically modeled using enums and can be streamlined using libraries like `thiserror` to reduce boilerplate.
- Boxing error types in Rust enums can help limit the maximum size of `Result<T>` and affect stack space usage, as illustrated in the example provided.
- Compiler optimizations and versions can significantly impact stack allocation for Rust functions, as seen in the comparison between Rust 1.74.0 and 1.75.0.