3 ms·
I might be completely wrong as I only played with rust but the current method seems to couple any async libraries you’d like to write to the executor. Which fee
by eknkc 2y ago
I might be completely wrong as I only played with rust but the current method seems to couple any async libraries you’d like to write to the executor. Which feels wrong imo.
Would it be feasible to provide async io (file, network) code in std and let the executors execute?
Or even some std traits that abstract the filesystem, network etc so that the executors can bring their own implementations but at least library code could only depend on std?
- wyager 2y agoCorrect, libraries do have to either pick a specific async IO library or use a trait for async IO. I have seen some of the latter in embedded-land, although I'm not sure if it's used in desktop async rust as well. The rust compiler currently discourages async traits with a warning, which seems wrong to me, but we use them extensively in embedded anyway.
- anonymoushn 2y agoThe feature is less than 1 year old, so a lot of the ecosystem couldn't use the feature because of being written before the feature existed. It does seem silly to have a warning today.