mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
Optimization: Rewrite Download::and_visit_tar to use tokio-tar (#587)
* Add new dep tokio-tar v0.3.0 to binstalk-downloader * Add new dep tokio-util v0.7.4 with feat io to binstalk-downloader * Add dep async-trait v0.1.59 to binstalk-downloader * Add new dep async-compression v0.3.15 to binstalk-downloader with features "gzip", "zstd", "xz", "bzip2", "tokio". * Rewrite `Download::and_visit_tar` to use `tokio-tar` to avoid the cumbersome `block_in_place`. * Apply temporary workaround: Rm use of let-else in mod visitor Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
39f175be04
commit
23a5937aff
6 changed files with 218 additions and 68 deletions
|
@ -10,6 +10,8 @@ edition = "2021"
|
|||
license = "GPL-3.0"
|
||||
|
||||
[dependencies]
|
||||
async-trait = "0.1.59"
|
||||
async-compression = { version = "0.3.15", features = ["gzip", "zstd", "xz", "bzip2", "tokio"] }
|
||||
binstalk-types = { version = "0.1.0", path = "../binstalk-types" }
|
||||
bytes = "1.3.0"
|
||||
bzip2 = "0.4.3"
|
||||
|
@ -28,6 +30,8 @@ tar = { package = "binstall-tar", version = "0.4.39" }
|
|||
tempfile = "3.3.0"
|
||||
thiserror = "1.0.37"
|
||||
tokio = { version = "1.22.0", features = ["macros", "rt-multi-thread", "sync", "time"], default-features = false }
|
||||
tokio-tar = "0.3.0"
|
||||
tokio-util = { version = "0.7.4", features = ["io"] }
|
||||
tower = { version = "0.4.13", features = ["limit", "util"] }
|
||||
tracing = "0.1.37"
|
||||
trust-dns-resolver = { version = "0.22.0", optional = true, default-features = false, features = ["dnssec-ring"] }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue