Rust errors without dependencies

Dev goes “no add-ons” with Rust errors; commenters split on safety and sanity

TLDR: A Rust dev wants error handling with no add‑ons, citing security and simplicity. Comments exploded: some say this reinvents the wheel, others demand better tools in the standard library, while pragmatists shout “just use anyhow” and move on—highlighting a bigger trust vs complexity battle in modern software.

A Rust developer swore off third‑party add‑ons (called “crates”) for handling errors, saying the built‑in tools are enough and safer. Cue the comment section going full reality TV. One camp shouted: you’re reinventing the wheel—just use anyhow and friends. j1elo joked the author is halfway to building their own anyhow anyway. Another camp backed the security angle, spooked by software supply‑chain fiascos, with drnick1 praising the old-school “download headers and own your fate” approach. Then came the standards crowd, with IshKebab calling it “mad” that Rust’s standard library still doesn’t ship a blessed, universal way to do errors.

The spiciest subplot: the Cloudflare “unwrap” drama. An “unwrap” is basically the panic button when something goes wrong. zahlman revisited how treating a config file as “trusted” blew up, turning “unwrap” into the meme of the day—“YOLO for servers.” Meanwhile, pragmatists chimed in: athrowaway3z’s hot take was to use anyhow “everywhere” until you absolutely need carefully labeled errors (they dropped YANGNI—“you aren’t gonna need it now”).

Between jokes like “panic at the parse” (that cursed "3^" input) and debates over security vs convenience, the thread split three ways: minimalists, maximalists, and “please just put something sane in the standard library” believers. Drama score: 10/10.

Key Points

  • The author advocates handling Rust errors using only the standard library, avoiding third-party crates.
  • Security and adaptability are cited as primary reasons for minimizing dependencies and using std-based error handling.
  • Rust’s error model emphasizes explicit handling via return codes (Result) instead of exceptions, increasing composability and cognitive load.
  • An example shows unwrap causing a panic on invalid input ("3^"), illustrating the risks of relying on unwrap in production code.
  • A Cloudflare outage is referenced to show that treating inputs as trusted can fail, and using unwrap shifts correctness responsibility to developers.

Hottest takes

“anyhow, at this point you are half way to reinvent the wheel” — j1elo
“it’s kind of mad that the standard library doesn’t have better options built in” — IshKebab
“use anyhow everywhere until you have an immediate demand for explicit Enums. YANGNI” — athrowaway3z
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.