News for hackers. Stuff that matters.
Re:Cloudflare outage on November 18, 2025 post mortem by phire on Tuesday November 18, 2025 @11:52PM (#45975986)
I think I'd prefer a compile-time guarantee.

Something that allows me to tag annotate a function (or my whole crate) as "no panic", and get a compile error if the function or anything it calls has a reachable panic.

This will allow it to work with many unmodified crates, as long as constant propagation can prove that any panics are unreachable. This approach will also allow crates to provide panicking and non panicking versions of their API (which many already do).

Re:Cloudflare outage on November 18, 2025 post mortem by aw1621107 on Wednesday November 19, 2025 @12:15AM (#45976109)
I think the most common solution at the moment is dtolnay's no_panic [0]. That has a bunch of caveats, though, and the ergonomics leave something to be desired, so a first-party solution would probably be preferable.

[0]: https://github.com/dtolnay/no-panic

Re:Cloudflare outage on November 18, 2025 post mortem by echelon on Wednesday November 19, 2025 @12:16AM (#45976114)
Yes, I want that. I also want to be able to (1) statically apply a badge on every crate that makes and meets these guarantees (including transitively with that crate's own dependencies) so I can search crates.io for stronger guarantees and (2) annotate my Cargo.toml to not import crates that violate this, so time isn't wasted compiling - we know it'll fail in advance.

On the subject of this, I want more ability to filter out crates in our Cargo.toml. Such as a max dependency depth. Or a frozen set of dependencies that is guaranteed not to change.