I was trying to make sense of all the various futures- crates and how they integrate with std::future.
One thing that tripped me up is that futures-util appears as a dependency of futures and also the other way around. On first glance that seems circular and thus ill formed but apparently it's not? I am a bit confused as to how that can work and even as it does, why one would do that.
Oh I think I maybe tripped up. I think it is two different versions of the Futures crate. That might have something to do then with with a compatibility layer between the old Future trait that is now called TryFuture.
Ok, to clear things up. This is the entry that confused me. In the list of dependents of futures, i.e. crates that depend on futures, we have listed futures-util
https://crates.io/crates/futures/reverse_dependencies
o
This confused me as it otherwise seemed like all futures- crates are combined in futures which would make futures-util depending on futures nonsensical.
But, if you look closely at the screenshot you'll see that it isn't futures v0.3.31 (the to date current version) but futures v0.1.25. In the next screenshot you can see that there is a compat module in futures-util for interop between futures v0.1 and v0.3.
https://docs.rs/futures-util/0.3.31/futures_util/