Skip to content

Commit

Permalink
Add tokio AsyncRead support
Browse files Browse the repository at this point in the history
  • Loading branch information
fasterthanlime committed Feb 1, 2024
1 parent 1016c80 commit a1cea81
Show file tree
Hide file tree
Showing 6 changed files with 308 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
{
"rust-analyzer.cargo.features": ["default", "lzma", "deflate64", "bzip2", "zstd"]
"rust-analyzer.cargo.features": [
"default",
"tokio",
"lzma",
"deflate64",
"bzip2",
"zstd"
],
"rust-analyzer.linkedProjects": [
"./Cargo.toml"
]
}
174 changes: 174 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ lzma-rs = { version = "0.3.0", features = ["stream"], optional = true }
deflate64 = { version = "0.1.7", optional = true }
bzip2 = { version = "0.4.4", optional = true }
zstd = { version = "0.13.0", optional = true }
tokio = { version = "1.35.1", optional = true }
futures = { version = "0.3.30", optional = true }
pin-project-lite = { version = "0.2.13", optional = true }

[features]
default = ["sync", "file", "deflate"]
Expand All @@ -49,13 +52,15 @@ deflate64 = ["dep:deflate64"]
lzma = ["dep:lzma-rs"]
bzip2 = ["dep:bzip2"]
zstd = ["dep:zstd"]
tokio = ["dep:tokio", "dep:futures", "dep:pin-project-lite"]

[dev-dependencies]
clap = { version = "4.4.18", features = ["derive"] }
humansize = "2.1.3"
indicatif = "0.17.7"
test-log = { version = "0.2.14", default-features = false, features = ["tracing-subscriber", "trace"] }
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
tokio = { version = "1.35.1", features = ["macros"] }

[profile.release]
debug = 1
3 changes: 3 additions & 0 deletions src/reader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ pub use self::archive_reader::{ArchiveReader, ArchiveReaderResult};

#[cfg(feature = "sync")]
pub mod sync;

#[cfg(feature = "tokio")]
pub mod tokio;
Loading

0 comments on commit a1cea81

Please sign in to comment.