5 ms·
that just makes the panics unrecoverable. It doesn't statically guarantee no panics.
by rcxdude 2y ago
that just makes the panics unrecoverable. It doesn't statically guarantee no panics.
- lmm 2y agoIt presumably avoids the linked in 300Kb that was supposedly part of the motivation for doing this though?
- wongarsu 2y agoThere is no-panic [1] to turn panics in a function into compile errors, or the older no-panics-whatsoever [2] to do the same for the entire binary 1: https://crates.io/crates/no-panic https://crates.io/crates/no-panic 2: https://crates.io/crates/no-panics-whatsoever https://crates.io/crates/no-panics-whatsoever
- themulticaster 2y agono-panic uses link-time shenanigans to prevent panics in the compiled binary, but this isn't 100% reliable (as explained in the README, just pointing this out)