Why Use Structured Errors in Rust Applications?

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. zig

    General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

    > Did Zig really do that?

    https://github.com/ziglang/zig/issues/544#issuecomment-61807...

    > In order to simplify everything, tabs are not allowed. Spaces are necessary; we can't ban spaces.

    They seem to be open to the alternative but not to a solution that isn't forced on people:

    > Maybe someday, we'll switch to tabs for indentation, spaces for alignment and make it a compile error if they are incorrectly mixed

    Zig already has a builtin code formatter that automatically changes formatting to their preference, but that's not enough.

  2. Stream

    Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.

    Stream logo
  3. rust

    Empowering everyone to build reliable and efficient software.

    Yeah I agree - in fact I ran into this very issue only hours ago. The entire error message was literally "operation not supported on this platform". Yeay.

    https://github.com/rust-lang/rust/issues/141854

    > I'll also note that this was quite annoying to debug since the error message in its entirety was `operation not supported on this platform`, you can't use RUST_BACKTRACE, rustfmt doesn't have extensive logging, and I don't fancy setting up WASM debugging. I resorted to tedious printf debugging. (Side rant: for all the emphasis Rust puts on compiler error messages its runtime error messages are usually quite terrible!)

    Even with working debugging it's hard to find the error since you can't set a breakpoint on `Err()` like you can with `throw`.

  4. thiserror

    derive(Error) for struct and enum error types

    [Thiserror 2.0](https://github.com/dtolnay/thiserror/releases/tag/2.0.0) (released 6 months ago) now supports no_std

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

Did you know that Rust is
the 5th most popular programming language
based on number of references?