-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
We will be aiming to release Tokio 1.0 by the end of 2020. This issue is a high-level proposal of how to get there.
Impacted crates
The 1.0 release applies to the tokio and tokio-macros crates. The remaining crates, tokio-util and tokio-test will remain at 0.x versions.
Changes
At a high level, Tokio 1.0 will be fairly close to Tokio 0.2. Major differences are:
- Updated I/O traits (io: propose new AsyncRead / AsyncWrite traits #2716, Possibly refactor AsyncBufRead #2428).
- Remove
miofrom the public API (io: removemiofrom the public API. #2728). - Update to
mio0.7 (tokio: update to mio 0.7 #1190). - Update to
bytes1.0 (io: depend on bytes 1.0 #3058). - Move remaining async fns to an intrusive waker style (io: rework I/O driver to use an intrusive linked list for wakers #2779, fs: switch to an intrusive waker style #2927, timer:
sleepfuture should become !Unpin #3028). - Runtime and
#[tokio::main]refinements (rt: Runtime refinements #2720). - Tweak (or temporarily remove)
DelayQueue(issue TBD). - Misc API tweaks (meta: breaking API changes #2928).
Open questions
There are still some questions that need to be finalized.
- Coordinating with the addition of
Streaminstd(stream: coordinating Tokio 1.0 with the availability of Stream in std #2870). - Consider making JoinHandle cancel on drop (Consider making JoinHandle cancel on drop #1830).
Pause on adding new APIs
Focus should be put on work that impacts existing APIs, either by altering them or removing them. Once Tokio 1.0 is released, there will be limited flexibility for altering imperfect APIs. However, it is always possible to add new APIs. There may be cases in which a new API is high value and very straight forward or a reason that adding the API after 1.0 is difficult. In this case, we can explore adding the API before 1.0.
In other words, now is the time to voice complaints about any existing API.
Target release date
Previously, Q3 2020 was mentioned as the target release date. However, productivity this year has been lower than expected due to unforeseen global events. We are now going to target the end of 2020 as a release date.
Intermediate 0.x releases
There will be a Tokio 0.3 release. This release will contain at the very least:
- New I/O traits.
- Runtime tweaks.
There also will be an "0.x" release made as a 1.0 candidate. So, there will be a minimum of two more 0.x releases before 1.0.
1.0 LTS guarantees
Tokio 1.0 will come with LTS guarantees. The proposal is:
- A minimum of 5 years of maintenance.
- A minimum of 3 years before a hypothetical 2.0 release.
The goal of these guarantees is to provide stability to the ecosystem.
MSRV
Tokio 1.0 will need a well-defined "minimum supported Rust version" policy. My proposal is:
- All 1.x Tokio releases will support at least a 6-month old Rust release.
- The MSRV will only be increased on 1.x releases.
Versioning policy
Because Tokio is pre-1.0, features have been released in 0.2.x releases. This will no longer be the case after 1.0.
- 1._.x releases should only contain bug fixes. Besides this, these releases should not substantially change runtime behavior.
- 1.x releases may contain new functionality and larger internal implementation changes.