-
Notifications
You must be signed in to change notification settings - Fork 389
maybe_async
complicates isomorphic use-cases
#559
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
Comments
maybe_async
prevents isomorphic use-casesmaybe_async
complicates isomorphic use-cases
@cryptoquick fwiw I am working on this as part of #165. My plan is to have a sync blockchain traits in |
Maybe! I might be able to finagle conditional compilation to accomplish that. Is your branch ready to try? Also, is it merged with main? (I'm typing this on mobile, otherwise I'd check, myself) |
Just got back to my machine to check, and it looks like that's just an issue, not a pull request. Still, this might work, and it's idiomatic to how other libraries in the Rust ecosystem works. I'd be willing to close this in light of the work being done there, if you think that makes sense, @LLFourn ? |
We are starting work on this change today. Won't be ready for testing this week I suspect. I'll keep you updated. |
Sounds good. I've also subscribed to the other thread, and also, let me know if you need any help testing your work. |
The core Wallet type is now Send+Sync and any async or blocking client can be used for blockchain syncing or persistence, see #1873. |
The
maybe_async
macro makes the function signature of each method different depending on whether the dependency is compiled for wasm32 or not. This isn't ideal for libraries that might be used in isomoprhic app frameworks like iced, which can compile to either web or desktop-native targets.I'm not sure what the best approach would be to fix this since Rust's async story is so complex right now. If at some point we enter the shiny future, we can just remove usage of the bdk-macros crate altogether.
For now, I think it's possible to bypass this issue by also using the
bdk-macros
crate, but this is imperfect because it essentially perpetuates the problem, and "infects" all upstream dependents.The text was updated successfully, but these errors were encountered: