zlacker

[parent] [thread] 3 comments
1. Laaas+(OP)[view] [source] 2024-01-19 23:25:54
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.

replies(3): >>anonym+B >>herman+82 >>martin+L2
2. anonym+B[view] [source] 2024-01-19 23:29:34
>>Laaas+(OP)
that solves the whole problem except the part where the consumer of the library has to deal with async
3. herman+82[view] [source] 2024-01-19 23:39:44
>>Laaas+(OP)
The article has a whole section about the problems they ran into with two crates:

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

4. martin+L2[view] [source] 2024-01-19 23:43:05
>>Laaas+(OP)
It's very obvious you did not read the article. This is literally covered.
[go to top]