When working on snafu's no_std compatibility, it has become clear that the situation around the lack of a core::Error or alloc::Error is really suboptimal. Introducing a whole new Error trait in snafu just for no_std seemed like it could lead to similar problems that failure had by becoming incompatible with the ecosystem. For snafu the solution is for now that it won't publicly expose an Error trait for no_std at all, but use one behind the scenes to not lose out on any of snafu's feature. This works quite well. But recently there came up the idea that maybe there could be a core-error crate, that provides an Error trait for the no_std ecosystem that could be used by snafu, anyhow, fehler and others. The crate would also have a std feature that automatically reexports the std::error::Error instead, when the feature is activated, so all the errors in your crate graph automatically get smoothly upgraded / downgraded between the different Error traits without there being any problems. And if there ever is a core::error::Error trait, it could probably backwards compatibly switch to that without having to touch either fehler, snafu or anyhow's codebase.
Considering anyhow is also planning to support no_std, this could be a good way to collaborate on an Error trait for all these crates.
When working on snafu's no_std compatibility, it has become clear that the situation around the lack of a core::Error or alloc::Error is really suboptimal. Introducing a whole new Error trait in snafu just for no_std seemed like it could lead to similar problems that failure had by becoming incompatible with the ecosystem. For snafu the solution is for now that it won't publicly expose an Error trait for no_std at all, but use one behind the scenes to not lose out on any of snafu's feature. This works quite well. But recently there came up the idea that maybe there could be a core-error crate, that provides an Error trait for the no_std ecosystem that could be used by snafu, anyhow, fehler and others. The crate would also have a std feature that automatically reexports the std::error::Error instead, when the feature is activated, so all the errors in your crate graph automatically get smoothly upgraded / downgraded between the different Error traits without there being any problems. And if there ever is a core::error::Error trait, it could probably backwards compatibly switch to that without having to touch either fehler, snafu or anyhow's codebase.
Considering anyhow is also planning to support no_std, this could be a good way to collaborate on an Error trait for all these crates.