-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Description
Feature Request
Summary
Nowadays hypercore is defined for storage where errors are failure::Error eg
This predates when Rust had std::error::Error trait, and could now be replaced with a Error + Send + Sync + 'static, such as anyhow, snafu or coreerror for a no_std crate.
This is also one less crate on the stack.
Motivation
This should help us move into no_std in the future, specially useful for WASM and embedded.
Guide-level explanation
We could replace failure with anyhow on random-access-disk and random-access-storage to use context during errors, which is also compatible with std::error::Error.
We can then define hypercore using the std Error trait, and broaden the types of Storages hypercore can use.
Reference-level explanation
Drawbacks
- Increase min rust version (would be increased by Async API on hypercore #97 anyway)
Rationale and alternatives
Unresolved Questions
Metadata
Metadata
Assignees
Labels
No labels