Comments (6)
How to maintain both a async and sync API?
I would recommend only maintaining an async API, and making the switch throughout.
We would require all consumers to also use an async executor if we don't expose both APIs.
That's accurate; within Rust itself that should be no problem (when using async-std). But for integration with other languages I'm not necessarily sure how that would work.
Is it ok to add async_trait as a dependency?
I'd say so; the only downside of this is some extra boxing, compile times, and weird type signatures in docs. But overall it makes life significantly better, so I'd def recommend using it.
from hypercore.
I'd probably migrate it as well.
from hypercore.
@yoshuawuyts thanks for the inputs. Would you also migrate random-access-storage
completely to be async
, or would you suggest to use the blanket implementation route?
from hypercore.
There is now a draft PR using async/await
on APIs that hit storage: #103
It's built on top of many other PRs tho, so it might take a while to be reviewed and land.
from hypercore.
@Frando Are you ok if we land PR to close some PRs?
We could release it as a RC version, and them try to investigate blocking or smol to abstract over the async executors in future releases.
from hypercore.
Landed on the beta versions
from hypercore.
Related Issues (20)
- Change stack from `failure` to `std::error::Error` HOT 2
- Feed.put with data yields weird results HOT 3
- Dynamic dispatch for storage? HOT 5
- Plan 0.12 release HOT 7
- Building latest version fails HOT 4
- Running benchmarks fails HOT 2
- Read key pair from disk HOT 3
- 🙋 Android bindings HOT 16
- Upgrade sha2 to 0.8.x HOT 1
- Implement feed.audit() HOT 5
- Possible issue with signing data.
- Cannot declare a satisfiable feed reference HOT 2
- refactor binary interface types from `usize` to their specific sizes HOT 2
- Remove Feed Builder in favor of Feed simple create function HOT 7
- update random-access-* HOT 2
- README is incorrect about what the sample code prints HOT 1
- Dependabot can't resolve your Rust dependency files
- How do I read an existing hypercore on disk? HOT 3
- Networking: NOISE handshake and transport encryption HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hypercore.