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
Rationale and alternatives
Unresolved Questions
Feature Request
Summary
Nowadays
hypercoreis defined for storage where errors arefailure::ErroregThis predates when Rust had
std::error::Errortrait, and could now be replaced with aError + Send + Sync + 'static, such as anyhow, snafu or coreerror for ano_stdcrate.This is also one less crate on the stack.
Motivation
This should help us move into
no_stdin the future, specially useful for WASM and embedded.Guide-level explanation
We could replace
failurewithanyhowonrandom-access-diskandrandom-access-storageto use context during errors, which is also compatible withstd::error::Error.We can then define
hypercoreusing the stdErrortrait, and broaden the types ofStorageshypercorecan use.Reference-level explanation
Drawbacks
Rationale and alternatives
Unresolved Questions