Skip to content

Conversation

@bltavares
Copy link
Member

@bltavares bltavares commented Feb 26, 2020

This commit moves the API from a sync call into async functions using async_trait.

We would like to use async operations on hypercore, and it would be nice to have the underlying storage using async-io when possible.
As discussed on datrs/hypercore#97, we could change the API to use async functions on the 'ram' trait.

Async Trait methods are still unstable, but possible using the 'async-trait' crate through a macro.

This PR moves the API to use async-fns. Tests are passing.

Choose one: a 🙋 feature

Checklist

  • tests pass
  • tests and/or benchmarks are included
  • documentation is changed or added

Context

Semver Changes

major as this is a breaking change and we are above 1.0.0

@bltavares bltavares marked this pull request as ready for review March 3, 2020 01:49
This commit moves the API from a sync call into async functions using async_trait.

We would like to use async operations on hypercore, and it would be nice to have the underlying storage using async-io when possible.
As discussed on datrs/hypercore#97, we could change the API to use async functions on the 'ram' trait.

Async Trait methods are still unstable, but possible using the 'async-trait' crate through a macro.

This PR moves the API to use async-fns. Tests are passing.
@bltavares bltavares merged commit b0f1507 into datrs:master Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants