Skip to content

Commit ad259c9

Browse files
committed
Implement async reader
1 parent f9cdf27 commit ad259c9

File tree

2 files changed

+177
-151
lines changed

2 files changed

+177
-151
lines changed

Cargo.toml

+6
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@ document-features = { version = "0.2", optional = true }
1616
encoding_rs = { version = "0.8", optional = true }
1717
serde = { version = "1.0", optional = true }
1818
memchr = "2.5"
19+
tokio = { version = "1.19", optional = true, default-features = false, features = ["io-util", "fs"] }
20+
async-recursion = { version = "1.0", optional = true }
1921

2022
[dev-dependencies]
2123
criterion = "0.3"
2224
pretty_assertions = "1.2"
2325
regex = "1"
2426
serde = { version = "1.0", features = ["derive"] }
2527
serde-value = "0.7"
28+
tokio = { version = "1.19", default-features = false, features = ["macros", "rt-multi-thread"] }
2629

2730
[[bench]]
2831
name = "bench"
@@ -94,6 +97,9 @@ serialize = ["serde"]
9497
## Enables support for recognizing all [HTML 5 entities](https://dev.w3.org/html5/html-author/charref)
9598
escape-html = []
9699

100+
## Enable support for asynchronous reading
101+
async = ["tokio", "async-recursion"]
102+
97103
[package.metadata.docs.rs]
98104
all-features = true
99105

0 commit comments

Comments
 (0)