-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audit color-eyre
and its dependencies
#76
Comments
It's weird that
The only place I've found unsafe in there is used to convert |
FWIW, it could use
|
This would have to be done in Eyre has a known issue4 and needs a fix and I've had a couple people say they're willing to do the fix but so far that hasn't materialized, so that would be the best starting point imo, and I imagine the lions share of further improvements that could be made would also need to happen in eyre itself rather than any of the other deps. I'm happy to help explain any of the unsafe that is currently present. I imagine the biggest simplification would be to rework the special downcasting support5 we inherited from Footnotes |
color-eyre
is a popular crate for error handling, with over 1 million downloads, and theeyre
itself has over 3 million downloads.It relies on a surprising amount of unsafe code, even with
default-features = false
:A number of dependencies look like they shouldn't need custom unsafe code - such as
owo-colors
,object
,gimli
, as well aseyre
itself.It would be nice to remove unsafe code where reasonable.
I haven't looked at the details yet, but the
object
andgimli
crates might be possible to switch tobytemuck
instead of custom code, andowo-colors
should not need any unsafe at all.The text was updated successfully, but these errors were encountered: