Open polarathene opened 1 month ago
I've now released eyra 0.19, which has features "eh-personality" and "panic-handler", which enable the unwinding crate's personality function and panic handler, respectively. And "eh-personality-continue" and "panic-handler-trap" to have eyra provide stub implementations which can be useful if you know your code never unwinds or traps.
Sorry for the delay in response, I haven't had time to come back and try the improvements out yet 😓
And "eh-personality-continue" and "panic-handler-trap" to have eyra provide stub implementations which can be useful if you know your code never unwinds or traps.
The documentation you added for these refer to no_std
, but is it also applicable to -C panic=abort
with std
too?
Since the unwinding 0.2.3
release recently, I have been hitting some build failures:
https://github.com/nbdd0121/unwinding/issues/39#issuecomment-2423487325
The crate maintainer states that unwinding
should not be used in this context, but it seems c-scape
unconditionally depends on it? I'm not sure where this concern is meant to be resolved, so just making you aware of it.
I'm documenting this separately from my older issue comment that briefly mentioned the topic:
eh_personality
orno_std
(in addition to the global allocator) and the related attributes when adaptingno_std
for Eyra.no_std
examples regardingpanic_handler
, so if this were to be resolved as additional Eyra features this might be a separate one fromeh_personality
.The current
no_std
example:Could presumably be simplified to:
It's unclear to me if that is a customization a user can presently do via their
Cargo.toml
dependencies config, or if that clashes with thec-scape
dependency config shown below.Additional context
Extracted from: https://github.com/sunfishcode/eyra/issues/27#issuecomment-1820271259
https://crates.io/crates/unwinding#personality-and-other-utilities
https://github.com/sunfishcode/c-ward/blob/aae71b8d3ce608a3ee3701b7646f345f1c649a27/c-scape/Cargo.toml#L45-L59