File tree 2 files changed +14
-4
lines changed
2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -29,13 +29,13 @@ http-body-util = { version = "=0.1.0-rc.3", optional = true }
29
29
httparse = " 1.8"
30
30
h2 = { version = " 0.3.9" , optional = true }
31
31
pin-project-lite = " 0.2.4"
32
- tokio = { version = " 1" , features = [" sync" ] }
33
32
34
33
# Optional
35
34
36
35
httpdate = { version = " 1.0" , optional = true }
37
36
itoa = { version = " 1" , optional = true }
38
37
libc = { version = " 0.2" , optional = true }
38
+ tokio = { version = " 1" , features = [" sync" ], optional = true }
39
39
tracing = { version = " 0.1" , default-features = false , features = [" std" ], optional = true }
40
40
want = { version = " 0.3" , optional = true }
41
41
@@ -74,13 +74,16 @@ full = [
74
74
]
75
75
76
76
# HTTP versions
77
- http1 = [" dep:itoa" ]
78
- http2 = [" dep:h2" ]
77
+ http1 = [" upgrade " , " dep:itoa" ]
78
+ http2 = [" upgrade " , " dep:h2" ]
79
79
80
80
# Client/Server
81
81
client = [" dep:want" ]
82
82
server = [" dep:httpdate" ]
83
83
84
+ # HTTP Upgrades
85
+ upgrade = [" dep:tokio" ]
86
+
84
87
# C-API support (currently unstable (no semver))
85
88
ffi = [" dep:libc" , " dep:http-body-util" ]
86
89
Original file line number Diff line number Diff line change 49
49
//! - `http2`: Enables HTTP/2 support.
50
50
//! - `client`: Enables the HTTP `client`.
51
51
//! - `server`: Enables the HTTP `server`.
52
+ //! - `upgrade`: Enables [HTTP Upgrades].
52
53
//!
53
54
//! [feature flags]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section
55
+ //! [Http Upgrades]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism
54
56
//!
55
57
//! # Unstable Features
56
58
//! hyper includes a set of unstable optional features that can be enabled through the use of a
@@ -93,7 +95,6 @@ pub mod ext;
93
95
mod mock;
94
96
pub mod rt;
95
97
pub mod service;
96
- pub mod upgrade;
97
98
98
99
#[ cfg( feature = "ffi" ) ]
99
100
#[ cfg_attr( docsrs, doc( cfg( all( feature = "ffi" , hyper_unstable_ffi) ) ) ) ]
@@ -115,3 +116,9 @@ cfg_feature! {
115
116
116
117
pub mod server;
117
118
}
119
+
120
+ cfg_feature ! {
121
+ #![ feature = "upgrade" ]
122
+
123
+ pub mod upgrade;
124
+ }
You can’t perform that action at this time.
0 commit comments