zlacker

[return to "The bane of my existence: Supporting both async and sync code in Rust"]
1. Laaas+Hf[view] [source] 2024-01-19 23:25:54
>>lukast+(OP)
Make two crates? rspotify-sync, rspotify-async?

Couldn't you perhaps make an async runtime that isn't async and just blocks? That would let you keep only the async interface.

◧◩
2. herman+Ph[view] [source] 2024-01-19 23:39:44
>>Laaas+Hf
The article has a whole section about the problems they ran into with two crates:

https://nullderef.com/blog/rust-async-sync/#_duplicating_the...

[go to top]