summaryrefslogtreecommitdiffstats
path: root/Cargo.toml
AgeCommit message (Collapse)Author
2020-12-07Add stress test (#3222)Blas Rodriguez Irizar
Created a simple echo TCP server that on two different runtimes that is called from a GitHub action using Valgrind to ensure that there are no memory leaks. Fixes: #3022
2020-05-06Remove `tokio-tls` from master (#2497)Lucio Franco
2019-12-24chore: move benches to separate crate (#2028)Carl Lerche
This allows the `benches` crate to depend on `tokio` with all feature flags. This is a similar strategy used for `examples`.
2019-11-22ci: bring back build tests (#1813)Carl Lerche
This directory was deleted when `cargo hack` was introduced, however there were some tests that were still useful (macro failure output). Also, additional build tests will be added over time.
2019-11-01compat: extract crate to a dedicated git repo (#1723)Carl Lerche
The compat crate is moved to https://github.com/tokio-rs/tokio-compat. This allows pinning it to specific revisions of the Tokio git repository. The master branch is intended to go through significant churn and it will be easier to update the compat layer in batches.
2019-11-01compat: add a compat runtime (#1663)Eliza Weisman
## Motivation The `futures` crate's [`compat` module][futures-compat] provides interoperability between `futures` 0.1 and `std::future` _future types_ (e.g. implementing `std::future::Future` for a type that implements the `futures` 0.1 `Future` trait). However, this on its own is insufficient to run code written against `tokio` 0.1 on a `tokio` 0.2 runtime, if that code also relies on `tokio`'s runtime services. If legacy tasks are executed that rely on `tokio::timer`, perform IO using `tokio`'s reactor, or call `tokio::spawn`, those API calls will fail unless there is also a runtime compatibility layer. ## Solution As proposed in #1549, this branch introduces a new `tokio-compat` crate, with implementations of the thread pool and current-thread runtimes that are capable of running both tokio 0.1 and tokio 0.2 tasks. The compat runtime creates a background thread that runs a `tokio` 0.1 timer and reactor, and sets itself as the `tokio` 0.1 executor as well as the default 0.2 executor. This allows 0.1 futures that use 0.1 timer, reactor, and executor APIs may run alongside `std::future` tasks on the 0.2 runtime. ### Examples Spawning both `tokio` 0.1 and `tokio` 0.2 futures: ```rust use futures_01::future::lazy; tokio_compat::run(lazy(|| { // spawn a `futures` 0.1 future using the `spawn` function from the // `tokio` 0.1 crate: tokio_01::spawn(lazy(|| { println!("hello from tokio 0.1!"); Ok(()) })); // spawn an `async` block future on the same runtime using `tokio` // 0.2's `spawn`: tokio_02::spawn(async { println!("hello from tokio 0.2!"); }); Ok(()) })) ``` Futures on the compat runtime can use `timer` APIs from both 0.1 and 0.2 versions of `tokio`: ```rust use std::time::{Duration, Instant}; use futures_01::future::lazy; use tokio_compat::prelude::*; tokio_compat::run_03(async { // Wait for a `tokio` 0.1 `Delay`... let when = Instant::now() + Duration::from_millis(10); tokio_01::timer::Delay::new(when) // convert the delay future into a `std::future` that we can `await`. .compat() .await .expect("tokio 0.1 timer should work!"); println!("10 ms have elapsed"); // Wait for a `tokio` 0.2 `Delay`... let when = Instant::now() + Duration::from_millis(20); tokio_02::timer::delay(when).await; println!("20 ms have elapsed"); }); ``` ## Future Work This is just an initial implementation of a `tokio-compat` crate; there are more compatibility layers we'll want to provide before that crate is complete. For example, we should also provide compatibility between `tokio` 0.2's `AsyncRead` and `AsyncWrite` traits and the `futures` 0.1 and `futures` 0.3 versions of those traits. In #1549, @carllerche also suggests that the `compat` crate provide reimplementations of APIs that were removed from `tokio` 0.2 proper, such as the `tcp::Incoming` future. Additionally, there is likely extra work required to get the `tokio-threadpool` 0.1 `blocking` APIs to work on the compat runtime. This will be addressed in a follow-up PR. Fixes: #1605 Fixes: #1552 Refs: #1549 [futures-compat]: https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.19/futures/compat/index.html
2019-10-31chore: check each feature works properly (#1695)Taiki Endo
It is hard to maintain features list manually, so use cargo-hack's `--each-feature` flag. And cargo-hack provides a workaround for an issue that dev-dependencies leaking into normal build (`--no-dev-deps` flag), so removed own ci tool. Also, compared to running tests on all features, there is not much advantage in running tests on each feature, so only the default features and all features are tested. If the behavior changes depending on the feature, we need to test it as another job in CI.
2019-10-29sync: move into `tokio` crate (#1705)Carl Lerche
A step towards collapsing Tokio sub crates into a single `tokio` crate (#1318). The sync implementation is now provided by the main `tokio` crate. Functionality can be opted out of by using the various net related feature flags.
2019-10-28executor: move into `tokio` crate (#1702)Carl Lerche
A step towards collapsing Tokio sub crates into a single `tokio` crate (#1318). The executor implementation is now provided by the main `tokio` crate. Functionality can be opted out of by using the various net related feature flags.
2019-10-26io: move into `tokio` crate (#1691)Carl Lerche
A step towards collapsing Tokio sub crates into a single `tokio` crate (#1318). The `io` implementation is now provided by the main `tokio` crate. Functionality can be opted out of by using the various net related feature flags.
2019-10-25net: move into tokio crate (#1683)Carl Lerche
A step towards collapsing Tokio sub crates into a single `tokio` crate (#1318). The `net` implementation is now provided by the main `tokio` crate. Functionality can be opted out of by using the various net related feature flags.
2019-10-22codec: move into tokio-util (#1675)Carl Lerche
Related to #1318, Tokio APIs that are "less stable" are moved into a new `tokio-util` crate. This crate will mirror `tokio` and provide additional APIs that may require a greater rate of breaking changes. As examples require `tokio-util`, they are moved into a separate crate (`examples`). This has the added advantage of being able to avoid example only dependencies in the `tokio` crate.
2019-10-21timer: move `tokio-timer` into `tokio` crate (#1674)Carl Lerche
A step towards collapsing Tokio sub crates into a single `tokio` crate (#1318). The `timer` implementation is now provided by the main `tokio` crate. The `timer` functionality may still be excluded from the build by skipping the `timer` feature flag.
2019-10-21fs: move into `tokio` (#1672)Carl Lerche
A step towards collapsing Tokio sub crates into a single `tokio` crate (#1318). The `fs` implementation is now provided by the main `tokio` crate. The `fs` functionality may still be excluded from the build by skipping the `fs` feature flag.
2019-09-19chore: rm tokio-buf (#1574)Carl Lerche
The crate has not been updated and it does not seem like it is a good path forward.
2019-08-19process: move into the tokio-net crate (#1475)Ivan Petkov
2019-08-17signal: move into tokio-net (#1463)Carl Lerche
2019-08-16uds: move into tokio-net (#1462)Carl Lerche
2019-08-16chore: rename ui-tests -> build-tests (#1460)Carl Lerche
2019-08-16udp: move tokio-udp into tokio-net (#1459)Carl Lerche
2019-08-15tcp: move tokio-tcp into tokio-net (#1456)Carl Lerche
2019-08-15threadpool: move threadpool into tokio-executor (#1452)Carl Lerche
The threadpool is behind a feature flag. Refs: #1264
2019-08-15reactor: rename tokio-reactor -> tokio-net (#1450)Carl Lerche
* reactor: rename tokio-reactor -> tokio-net This is in preparation for #1264
2019-08-15executor: move current-thread into crate (#1447)Carl Lerche
The `CurrentThread` executor is exposed using a feature flag. Refs: #1264
2019-07-29Update process to use std::future (#1343)andy finch
2019-07-25buf: Inital pass at updating BufStream (#1355)Lucio Franco
2019-07-19chore: remove tokio-futures facade crate (#1327)Carl Lerche
This switches from using the tokio-futures facade to referencing futures-* crates directly.
2019-07-16tls: update to std-future (#1224)João Oliveira
2019-07-11fs: update to use `std::future` (#1269)andy finch
2019-07-08uds: update to std-future (#1227)Yin Guanhao
2019-07-03signal: migrate to std::futures (#1218)Ivan Petkov
Migrate to std::futures and the futures 0.3 preview and use async/await where possible **Breaking change:** the IoFuture and IoStream definitions used to refer to Box<dyn Future> and Box<dyn Stream>, but now they are defined as Pin<...> versions which are technically breaking. No other breaking or functional changes have been made
2019-06-28chore: remove `tokio-trace`, add "Related Projects" to README (#1221)Eliza Weisman
## Motivation The `tokio-trace` and `tokio-trace-core` crates have been renamed to `tracing` and `tracing-core`, and moved to their own repository (`tokio-rs/tracing`). ## Solution This branch removes `tokio-trace` and `tokio-trace-core` from the `tokio` repository. In addition, I've added a "Related Projects" section to the root README, which lists `tracing` (as well as `mio`, and `bytes`) as other libraries maintained by the Tokio project. I thought that this would help folks looking for `tokio-trace` here find it in its new home. In addition, it changes `tokio` to depend on `tracing-core` rather than `tokio-trace-core`. Closes #1159 Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2019-06-27threadpool: update to std::future (#1219)Carl Lerche
An initial pass at updating `tokio-threadpool` to `std::future`. The codebase and tests both now run using `std::future` but the wake mechanism is not ideal. Follow up work will be required to improve on this. Refs: #1200
2019-06-27codec: update to use std-future (#1214)jesskfullwood
Strategy was to - copy the old codec code that was temporarily being stashed in `tokio-io` - modify all the type signatures to use Pin, as literal a translation as possible - fix up the tests likewise This is intended just to get things compiling and passing tests. Beyond that there is surely lots of refactoring that can be done to make things more idiomatic. The docs are unchanged. Closes #1189
2019-06-26Update tokio-udp to use std-future (#1199)Yin Guanhao
2019-06-25macros: re-export `main` macro from `tokio` (#1198)Carl Lerche
Includes minor fixes and a very basic example. Fixes #1183
2019-06-24Update Tokio to use `std::future`. (#1120)Carl Lerche
A first pass at updating Tokio to use `std::future`. Implementations of `Future` from the futures crate are updated to implement `Future` from std. Implementations of `Stream` are moved to a feature flag. This commits disables a number of crates that have not yet been updated.
2019-04-25Async/await polish (#1058)Carl Lerche
A general refresh of Tokio's experimental async / await support.
2019-04-23Introduce `tokio-test` crate (#1030)Lucio Franco
2019-03-22chore: fix Cargo.toml filesCarl Lerche
2019-03-21executor: add TypedExecutor (#993)Carl Lerche
Adds a `TypedExecutor` trait that describes how to spawn futures of a specific type. This is useful for implementing functions that are generic over an executor and wish to support both `Send` and `!Send` cases.
2019-03-19chore: repo maintenance + no path dependencies (#991)Carl Lerche
- Move `tokio` into its own directory. - Remove `path` dependencies. - Run tests with once with crates.io dep and once with patched dep.
2019-03-13Bump Tokio to v0.1.17 (#983)Carl Lerche
Also bumps: - tokio-sync (v0.1.4)
2019-03-13tokio: Enable trace subscriber propagation in the runtime (#966)Eliza Weisman
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2019-03-13tokio: fix dependency versions (#944)南浦月
#943
2019-03-01Bump Tokio to 0.1.16. (#941)Carl Lerche
Also bumps: * tokio-current-thread (0.1.5) * tokio-fs (0.1.6) * tokio-io (0.1.12) * tokio-reactor (0.1.9) * tokio-threadpool (0.1.12)
2019-02-24Fix rustfmt check (#927)Carl Lerche
* Add set -e to .travis.yml * Fix fmt * Fix codec feature
2019-02-21chore: remove patch statements in Cargo.toml (#914)Carl Lerche
2019-02-19Introduce `tokio-trace` (#827)Eliza Weisman
<!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Bug fixes and new features should include tests. Contributors guide: https://github.com/tokio-rs/tokio/blob/master/CONTRIBUTING.md --> ## Motivation In asynchronous systems like Tokio, interpreting traditional log messages can often be quite challenging. Since individual tasks are multiplexed on the same thread, associated events and log lines are intermixed making it difficult to trace the logic flow. Currently, none of the available logging frameworks or libraries in Rust offer the ability to trace logical paths through a futures-based program. There also are complementary goals that can be accomplished with such a system. For example, metrics / instrumentation can be tracked by observing emitted events, or trace data can be exported to a distributed tracing or event processing system. In addition, it can often be useful to generate this diagnostic data in a structured manner that can be consumed programmatically. While prior art for structured logging in Rust exists, it is not currently standardized, and is not "Tokio-friendly". ## Solution This branch adds a new library to the tokio project, `tokio-trace`. `tokio-trace` expands upon logging-style diagnostics by allowing libraries and applications to record structured events with additional information about *temporality* and *causality* --- unlike a log message, a span in `tokio-trace` has a beginning and end time, may be entered and exited by the flow of execution, and may exist within a nested tree of similar spans. In addition, `tokio-trace` spans are *structured*, with the ability to record typed data as well as textual messages. The `tokio-trace-core` crate contains the core primitives for this system, which are expected to remain stable, while `tokio-trace` crate provides a more "batteries-included" API. In particular, it provides macros which are a superset of the `log` crate's `error!`, `warn!`, `info!`, `debug!`, and `trace!` macros, allowing users to begin the process of adopting `tokio-trace` by performing a drop-in replacement. ## Notes Work on this project had previously been carried out in the [tokio-trace-prototype] repository. In addition to the `tokio-trace` and `tokio-trace-core` crates, the `tokio-trace-prototype` repo also contains prototypes or sketches of adapter, compatibility, and utility crates which provide useful functionality for `tokio-trace`, but these crates are not yet ready for a release. When this branch is merged, that repository will be archived, and the remaining unstable crates will be moved to a new `tokio-trace-nursery` repository. Remaining issues on the `tokio-trace-prototype` repo will be moved to the appropriate new repo. The crates added in this branch are not _identical_ to the current head of the `tokio-trace-prototype` repo, as I did some final clean-up and docs polish in this branch prior to merging this PR. [tokio-trace-prototype]: https://github.com/hawkw/tokio-trace-prototype Closes: #561 Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2019-01-25Bump Tokio to v0.1.15. (#869)Carl Lerche
Also bumps: - tokio-sync (0.1.0) - tokio-threadpool (0.1.11) - tokio-timer (0.2.9)