[package]
name = "binstall"
description = "Library backend for cargo-binstall"
repository = "https://github.com/cargo-bins/cargo-binstall"
documentation = "https://docs.rs/binstall"
version = "0.1.0"
rust-version = "1.61.0"
authors = ["ryan <ryan@kurte.nz>"]
edition = "2021"
license = "GPL-3.0"

[dependencies]
async-trait = "0.1.57"
bytes = "1.2.1"
bzip2 = "0.4.3"
cargo_toml = "0.11.5"
clap = { version = "3.2.17", features = ["derive"] }
compact_str = { version = "0.5.2", features = ["serde"] }
crates_io_api = { version = "0.8.0", default-features = false }
flate2 = { version = "1.0.24", default-features = false }
flock = { version = "0.1.0", path = "../flock" }
futures-util = { version = "0.3.23", default-features = false }
home = "0.5.3"
itertools = "0.10.3"
jobserver = "0.1.24"
log = { version = "0.4.17", features = ["std"] }
miette = "5.3.0"
normalize-path = { version = "0.1.0", path = "../normalize-path" }
once_cell = "1.13.0"
reqwest = { version = "0.11.11", features = ["stream"], default-features = false }
scopeguard = "1.1.0"
semver = { version = "1.0.13", features = ["serde"] }
serde = { version = "1.0.143", features = ["derive"] }
serde-tuple-vec-map = "1.0.1"
serde_json = "1.0.83"
strum = "0.24.1"
strum_macros = "0.24.3"
tar = "0.4.38"
tempfile = "3.3.0"
thiserror = "1.0.32"
tinytemplate = "1.2.1"
tokio = { version = "1.20.1", features = ["macros", "rt", "process", "sync", "signal"], default-features = false }
toml_edit = { version = "0.14.4", features = ["easy"] }
url = { version = "2.2.2", features = ["serde"] }
xz2 = "0.1.7"

# Disable all features of zip except for features of compression algorithms:
# Disabled features include:
#  - aes-crypto: Enables decryption of files which were encrypted with AES, absolutely zero use for
#    this crate.
#  - time: Enables features using the [time](https://github.com/time-rs/time) crate,
#    which is not used by this crate.
zip = { version = "0.6.2", default-features = false, features = ["deflate", "bzip2", "zstd"] }

# zstd is also depended by zip.
# Since zip 0.6.2 depends on zstd 0.10.0, we also have to use 0.10.0 here,
# otherwise there will be a link conflict.
zstd = { version = "0.10.0", default-features = false }

[target.'cfg(any(target_os = "macos", target_os = "windows"))'.dependencies]
guess_host_triple = "0.1.3"

[dev-dependencies]
env_logger = "0.9.0"

[features]
default = ["static", "zlib-ng", "rustls"]

static = ["bzip2/static", "xz2/static"]
pkg-config = ["zstd/pkg-config"]

zlib-ng = ["flate2/zlib-ng"]

rustls = ["crates_io_api/rustls", "reqwest/rustls-tls"]
native-tls = ["reqwest/native-tls"]