I’d like to discuss about a compiler flag disabling panic!
handling. More precisely, panic!
would expand to a std::intrinsics::abort
, meaning that the whole process exits. Therefore, stack unwinding info would be useless and should not be generated, resulting in a smaller output.
I don’t advocate for its systematic use and this is out of discussion.
It is actually the same feature as g++'s -fno-exception
.
Most functions of the std library are switching from panic!
ing to returning a Result<>
, so they will be usable with this flag. The only field I’m aware of that may stay problematic is memory allocation, I I have no arguments about what to do in this case, I guess aborting would be okay.