-
Notifications
You must be signed in to change notification settings - Fork 249
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
Async version of bitcoincore-rpc #78
Comments
Is there demand for an async version? |
I think if we do this, I would like to do it in a way that also supports batching. Like every call returns an object that can have several getters, one for an async execution, a sync execution or being added to a batch. |
We would need it 😬 Apart from that, most of the Rust ecosystem around networking is already async (tokio, async-std). In addition, async/await is landing on stable for the next release (1.39).
|
Batching as in, sending the requests at once and wait for all their results? |
If you're still measuring demand then I need to signal that I would also like an async version. The async paradigm is really good because it keeps the app responsive and resource-efficent, without damaging the code's readability as with what happens with a select() loop |
At some point I'll need some form of async support too for a project I'm working on and might just build it then. |
There's definitely some demand. We have a RPC/REST client that can act as a trivial SPV client at https://github.com/rust-bitcoin/rust-lightning/pull/614/files#diff-386a00d0abcf87d8b4cff018609f2b56 that is all async. |
FWIW I put together a set of crates based on the rust-bitcoin suite that use async: https://crates.io/crates/bitcoincore-rpc-async Not heavily tested, but the changes weren't too intense. |
Please give some feedback on this idea I have, it might be relevant to this discussion: #212 |
Same here. Wish this had async support. It's been 3 years since this issue was opened, and I think async is a lot more popular/common in Rust now. |
Is there an async version of the library in the planning?
I guess that is blocked by async support in jsonrpc?
The text was updated successfully, but these errors were encountered: