zlacker

[return to "The bane of my existence: Supporting both async and sync code in Rust"]
1. eximiu+2G[view] [source] 2024-01-20 03:40:59
>>lukast+(OP)
`block_on` seems like the right balance of code duplication and overhead, imo.

It is a somewhat strange compile time jumble of libraries but a compile time overhead isn't so bad.

◧◩
2. junon+UG1[view] [source] 2024-01-20 15:15:09
>>eximiu+2G
This is my take, too. Write async and then use block_on. It's worked for us just fine, albeit a little annoying. We made macros to help clean things up.
[go to top]