-
Notifications
You must be signed in to change notification settings - Fork 150
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
Remove Anyhow usage to make the crate's error handling no_std
compatible
#343
Comments
You can implement Display now without the flag and we will add the flags once we introduce |
All true rust types know their size and alignment, which In consequence, one could build a We could then make At this point, if one has a no_std compatable I've zero time to implement this, but if anyone gets interested then I'm happy to give some pointers. |
I really like the idea @burdges . And also seems that there's work on the community towards a similar solution. Thanks a lot for the suggestion and taking time to explain it, is really interesting! 😃 |
* Remove usage of anyhow and thiserror crates Fixes #343 * Centralize errors in a single file This has the added effect of being able to entirely drop usage of anyhow, even in tests, as well as removing a lot of map_err calls. Additionally, the Display implementation for Error is now captured by a feature flag for "std". * Address review comments - Remove conditional compilation flag in lib.rs - Section off errors with comments - Export the error module directly in the prelude * Update CHANGELOG
Managing error handling in
no_std
crates that rely ondusk-plonk
it's quite tough since all of the errors useanyhow::Result
andanyhow::Error
. This is a problem sinceanyhow
always gets inclued and it'sno_std
version forces to include allocators which might not be desired.The idea is to create new types for the plonk errors that are no-std compatible and that impl display and other
std
-related stuff under astd
flag.The text was updated successfully, but these errors were encountered: