[package] name = "http-downloader" version = "0.3.2" authors = ["ycysdf"] categories = ["web-programming::http-client"] description = "支持多线程与断点续传的 Http 下载库" edition = "2021" homepage = "https://github.com/ycysdf/http-downloader" keywords = ["http", "download", "network"] license = "MIT" readme = "README.md" repository = "https://github.com/ycysdf/http-downloader" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [workspace] members = [ "examples/*" ] [dependencies] reqwest = { version = "0.11.13", features = ["default-tls", 'stream'] } headers = "0.3" parking_lot = { version = "0.12" } tokio = { version = "1", features = ["rt", "macros"] } tokio-util = { version = "0.7", features = [] } thiserror = "1" anyhow = "1" async-trait = "0.1" bytes = "1.3" futures-util = { version = "0.3" } url = { version = "2" } # optional dependencies bson = { version = "2.3.0", optional = true } serde = { version = "1.0", optional = true } tracing = { version = "0.1", optional = true } async-stream = { version = "0.3", optional = true } async-graphql = { version = "5", optional = true } [dev-dependencies] tracing-subscriber = { version = "0.3" } bson = { version = "2.3.0" } serde = { version = "1.0" } tracing = { version = "0.1" } [features] # 默认开启 tokio tracing default = ["tracing"] # 一些类型作为 async-graphql 输入或者输出对象 async-graphql = ["dep:async-graphql"] # 全部扩展 all-extensions = ["status-tracker", "speed-limiter", "speed-tracker", "breakpoint-resume", "tracing", "bson-file-archiver"] # 下载状态追踪 status-tracker = ["tracing"] # 下载速度追踪 speed-tracker = ["tracing"] # 下载速度限制 speed-limiter = ["tracing"] # 断点续传 breakpoint-resume = ["tracing"] # 断点续传,文件存储器 bson-file-archiver = ["breakpoint-resume", "tracing", "serde", "bson", "url/serde"]