@@ -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
[[bench ]]
28
32
name = " bench"
@@ -94,6 +98,19 @@ serialize = ["serde"]
94
98
# # Enables support for recognizing all [HTML 5 entities](https://dev.w3.org/html5/html-author/charref)
95
99
escape-html = []
96
100
101
+ # # Enables support for asynchronous reading from `tokio`'s IO-Traits.
102
+ # #
103
+ # # This can be used for example with `Reader::from_async_reader(read)` where `read`
104
+ # # is some type implementing `tokio::io::AsyncBufRead`.
105
+ async = [" tokio" , " async-recursion" ]
106
+
107
+ # # Enables support for asynchronous reading from files using `tokio`. This feature
108
+ # # also automatically enables the `async` feature as well.
109
+ # #
110
+ # # This can be used for example with `Reader::from_file_async(path)` where `path`
111
+ # # is a file path.
112
+ async-fs = [" async" , " tokio/fs" ]
113
+
97
114
[package .metadata .docs .rs ]
98
115
all-features = true
99
116
0 commit comments