[package] name = "booru-dl" version = "0.1.0" edition = "2021" rust-version = "1.80" authors = ["Sean Wang <126865849+WSH032@users.noreply.github.com>"] description = "A command line tool to download images and tags txt from booru" readme = "README.md" repository = "https://github.com/WSH032/booru-dl/" license = "Apache-2.0" keywords = ["booru", "downloader", "api"] categories = [ "api-bindings", "asynchronous", "command-line-utilities", "web-programming", ] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # NOTE: version constraints # https://iscinumpy.dev/post/bound-version-constraints/ [dependencies.reqwest] version = "0.12" default-features = false # we enable all default features except for the `default-tls` feature, # which is enabled by `self` crate default feature. # All the default features see: features = [ # default features 👇 "charset", "http2", "macos-system-configuration", # default features 👆 "json", ] [dependencies] tokio = { version = "1", features = ["full"] } serde = { version = "1", features = ["derive"] } serde_json = { version = "1" } validator = { version = "0.18", features = ["derive"] } thiserror = { version = "1" } anyhow = { version = "1" } rayon = { version = "1" } tokio-rayon = { version = "2" } digest = { version = "0.10" } md-5 = { version = "0.10" } base16ct = { version = "0.2", features = ["alloc"] } # cli features 👇 # TODO: We have temporarily made `indicatif` required, # but we may change it to optional in the future. indicatif = { version = "0.17" } dialoguer = { version = "0.11", optional = true } clap = { version = "4", optional = true, features = ["derive", "cargo"] } toml = { version = "0.8", optional = true } # cli features 👆 [dev-dependencies] tempfile = { version = "3" } # HACK: This a hack, see: https://github.com/rust-lang/cargo/issues/2911#issuecomment-749580481 # also: https://github.com/rust-lang/cargo/issues/9518#issuecomment-1021425348 booru-dl = { path = ".", default-features = false, features = ["__toml"] } [features] # We must enable at least one tls feature, # or we will get an error because we use https to visit the booru. default = ["default-tls"] # See: https://docs.rs/reqwest/latest/reqwest/#optional-features # NOTE: keep following `tls` features in sync with cfg `compile_error` in `lib.rs` default-tls = ["reqwest/default-tls"] native-tls = ["reqwest/native-tls"] native-tls-vendored = ["reqwest/native-tls-vendored"] native-tls-alpn = ["reqwest/native-tls-alpn"] rustls-tls = ["reqwest/rustls-tls"] rustls-tls-manual-roots = ["reqwest/rustls-tls-manual-roots"] rustls-tls-webpki-roots = ["reqwest/rustls-tls-webpki-roots"] rustls-tls-native-roots = ["reqwest/rustls-tls-native-roots"] # we use this private feature to enable some `dev-dependencies` # `__` prefix see: https://github.com/rust-lang/cargo/issues/10882 __toml = ["dep:toml"] cli = ["dep:clap", "__toml", "dep:dialoguer"] [[bin]] name = "booru-dl" path = "src/main.rs" required-features = ["cli"] [package.metadata.docs.rs] # See: https://docs.rs/about/metadata all-features = true [lints.rust] # # https://github.com/rust-lang/rust-clippy/issues/5196 # warnings = "deny" [profile.release] # # https://github.com/johnthagen/min-sized-rust # strip = true lto = "thin" codegen-units = 1