@@ -16,13 +16,17 @@ document-features = { version = "0.2", optional = true }
16
16
encoding_rs = { version = " 0.8" , optional = true }
17
17
serde = { version = " 1.0" , optional = true }
18
18
memchr = " 2.5"
19
+ tokio = { version = " 1.19" , optional = true , default-features = false , features = [" io-util" ] }
20
+ async-recursion = { version = " 1.0" , optional = true }
19
21
20
22
[dev-dependencies ]
21
23
criterion = " 0.3"
22
24
pretty_assertions = " 1.2"
23
25
regex = " 1"
24
26
serde = { version = " 1.0" , features = [" derive" ] }
25
27
serde-value = " 0.7"
28
+ tokio = { version = " 1.20" , default-features = false , features = [" macros" , " rt-multi-thread" ] }
29
+ tokio-test = " 0.4"
26
30
27
31
[lib ]
28
32
bench = false
@@ -101,6 +105,19 @@ serialize = ["serde"]
101
105
# # Enables support for recognizing all [HTML 5 entities](https://dev.w3.org/html5/html-author/charref)
102
106
escape-html = []
103
107
108
+ # # Enables support for asynchronous reading from `tokio`'s IO-Traits.
109
+ # #
110
+ # # This can be used for example with `Reader::from_async_reader(read)` where `read`
111
+ # # is some type implementing `tokio::io::AsyncBufRead`.
112
+ async = [" tokio" , " async-recursion" ]
113
+
114
+ # # Enables support for asynchronous reading from files using `tokio`. This feature
115
+ # # also automatically enables the `async` feature as well.
116
+ # #
117
+ # # This can be used for example with `Reader::from_file_async(path)` where `path`
118
+ # # is a file path.
119
+ async-fs = [" async" , " tokio/fs" ]
120
+
104
121
[package .metadata .docs .rs ]
105
122
all-features = true
106
123
0 commit comments