It's OK but not great.
Ideally library authors should provide a sync facade so people don't have to deal with this, like reqwest does.
Ideally library authors should provide a sync facade so people don't have to deal with this, like reqwest does.
Also, the other way around might be simpler. If the library wants to be async, make it async-only, and let callers block_on it. https://docs.rs/tokio/latest/tokio/runtime/struct.Runtime.ht...
It’s repetitive but it’s simple.