This is intended to serve as a tracking issue for things that need to be resolved before the 0.3.0 release which will be published alongside Rust 1.39. This release will remove the -preview suffixes from all the current crates and release them under futures and futures-*.
I think @LucioFranco already raised the question in context of the release on zulip. But I would also be interested to know what the concrete idea for stabilization of the individual parts of this crate is. I think there contents with a variety of maturity and usefulness, and having a plan on what is intended to be long-term maintained and what not sounds great!
The answer could obviously be: everything. But that could it make it potentially harder to evolve the library than having a smaller content.
Here is my personal wishlist for stabilization:
The join! and select! macros as well as all their dependencies (which is FusedFuture at the moment). Used them in all programs, whether it's std or not.
join_all. I think the use-cases for those things got a lot smaller with the introduction of async_await. However those things seem fairly stable and useable for lots of people, so they are good to have._poll() methods. And I personally would also require the traits to be no-std compatible (error type).futures-rs as a dependency. However I think most applications will in the end use executors of different libraries that are also integrated with IO reactors or represent the GUI mainloop.I think it is necessary to decide the crate name of futures-test (see https://github.com/rust-lang-nursery/futures-rs/issues/1169#issuecomment-416854334).
EDIT: this seems solved.
(There are many other things, but I will comment later.)
To provide feedback from async-std's side of things: I think things are looking really good! We primarily rely on futures-core and futures-io, so my feedback is mostly about that. This is an unordered list of things I think we may want to consider before the release:
Stream is currently implemented on VecDeque which is the only one, and feels slightly out of place.IntoStream and FromStream for std::collections can only be implemented as part of futures-core; which is currently limiting some of our implementations. This may be worth adding to futures-core.await is meant to call IntoFuture, but currently it doesn't. I couldn't find any mention that plans had deviated, so I'm assuming async/await currently doesn't do this because we're still in MVP state. To that extent it may be a good idea to introduce this trait in futures-core first.AsyncRead and AsyncWrite be part of futures-core? For async-std we'd still need to pull in futures-io for the BufRead trait, but overall I think this may be a question worth answering.__edit:__ Also as for a timeline to release 0.3.0; could we maybe plan to do this at least a week before 1.39 hits stable? This would give us time to update all of our crates so the moment things stabilize we're all set and updated. I suspect a lot of people will want to try out async/await, and in order for them to have a good first impression we probably must allow the ecosystem to have a bit of time to prepare.
__edit:__ A PR to std has been made to add IntoFuture: https://github.com/rust-lang/rust/pull/65244
Overall I'm feeling quite good about the current state of futures! I believe we're closing in on 400 days of [email protected], and excited to finally be back on regular releases!
cc/ @stjepang
- async-rs/async-std#259 - In RFC2394
awaitis meant to callIntoFuture, but currently it doesn't. I couldn't find any mention that plans had deviated, so I'm assumingasync/awaitcurrently doesn't do this because we're still in MVP state. To that extent it may be a good idea to introduce this trait infutures-corefirst.
I asked about this on Zulip here. Not a very solid answer there, it was just dropped at some point.
This should really be remedied IMO, but it will apparently require someone to push for it.
Executors. Great to get something out of the box when just taking futures-rs as a dependency.
I'd argue for definitely dropping those from the main futures crate. I always saw futures as a core library, and getting executors automatically was somewhat weird to me. There are some use-cases for simple and light weight executors, but imo they should be a separate crate.
Another note on crate organization: similar to the complexity reduction in tokio, I'd love to see futures collapsed into a single crate, with optional things handled via features.
See #1356 and #1688 about collapsing the crates, the reason for the majority of the boundaries are about semver stability.
Here's my perspective:
futures-coreSpawn, LocalSpawn, SpawnError, and put them in futures-executor somehow. https://github.com/rust-lang-nursery/futures-rs/issues/1830FutureObj and LocalFutureObj (they seem only needed for Spawn and friends?).AtomicWaker. It's only exposed in a doc(hidden) task::__internal module, but it doesn't seem like we need to compile it if only after the core traits.futures-executorThreadPool. There's probably more efficient executors. But maybe it's useful to be able to use quickly... If so, then at least make it optional (default off), so we don't need to compile it unless asked for.futures-utillock stuff optional. Well, more specifically, as slab is already optional, fix the issues if you disable it (turn off Mutex and FutureExt::shared).futuresfutures and enable the features they want, instead of depending on the internal crates individually. (https://github.com/rust-lang-nursery/futures-rs/issues/1875)unstable optional feature may be a little too easy for a user to unknowingly depend on. A user could depend on futures, and some 3rd library, and the 3rd one could enable unstable, and the user can rely on "unstable" APIs without opting in. Maybe the danger here isn't that big a deal in practice. Or maybe we should consider what rayon did: require the end user to opt-in to unstable features via RUSTFLAGS="--cfg futures_unstable".It's only exposed in a
doc(hidden)task::__internalmodule, but it doesn't seem like we need to compile it if only after the core traits.
This is because both futures-channel and futures-util require AtomicWaker. But I think there are some crates that do not need combinators like futures-channel but need AtomicWaker, so it is maybe good to separate this.
Also, I was thinking of adding a new crate as a solution for https://github.com/rust-lang-nursery/futures-rs/issues/1830#issuecomment-532890011.
Personally, I think it might be a good idea to add a crate that provides "items contained in the futures::task module except for *Ext trait".
So, I can't tell if suggested feedback in this issue should be incorporated or not, but we only have a little more than a week to do so if desired.
@seanmonstar a number of the above issues have been handled already-- i'm adding issues to the 0.3 release milestone in an effort to triage and resolve remaining issues before the release. If you have more things you'd like to see captured, please open an issue and I'll make sure that it gets attention! Thanks for all your help listing things here and making sure we're on track for next week's release :)
To update here: my plan is to release next Tuesday, November 4th, in the AM PST. Let me know if this doesn't meet your needs, and I'd be happy to work to try and push things around as needed.
Just a fun fact,- the nearest Tue, Nov 4th is the year of 2025. Please tell us you were not planning to wait until then:)
Heh, meant the 5th, thanks though :)
It's currently the 6th in PST. Was there a delay?
@leo60228 Yes. I'm waiting on approval from reviewers in https://github.com/rust-lang-nursery/futures-rs/pull/1954.
0.3.0 has been released! Apologies for the delay, and thank you for your patience :)
Most helpful comment
0.3.0 has been released! Apologies for the delay, and thank you for your patience :)