feat(rt): make tokio runtime optional
A Cargo feature `runtime` is added, which is enabled by default, that includes the following: - The `client::HttpConnector`, which uses `tokio::net::TcpStream`. - The `server::AddrStream`, which uses `tokio::net::TcpListener`. - The `hyper::rt` module, which includes useful utilities to work with the runtime without needing to import `futures` or `tokio` explicity. Disabling the feature removes many of these niceties, but allows people to use hyper in environments that have an alternative runtime, without needing to download an unused one.
This commit is contained in:
		| @@ -5,9 +5,8 @@ use std::time::Duration; | ||||
|  | ||||
| use futures::{Async, Future, Poll, Stream}; | ||||
| use futures_timer::Delay; | ||||
| //TODO: change to tokio_tcp::net::TcpListener | ||||
| use tokio::net::TcpListener; | ||||
| use tokio::reactor::Handle; | ||||
| use tokio_tcp::TcpListener; | ||||
| use tokio_reactor::Handle; | ||||
|  | ||||
| use self::addr_stream::AddrStream; | ||||
|  | ||||
| @@ -170,7 +169,7 @@ mod addr_stream { | ||||
|     use std::net::SocketAddr; | ||||
|     use bytes::{Buf, BufMut}; | ||||
|     use futures::Poll; | ||||
|     use tokio::net::TcpStream; | ||||
|     use tokio_tcp::TcpStream; | ||||
|     use tokio_io::{AsyncRead, AsyncWrite}; | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user