[package]
authors = [
    "Daniel Silverstone <dsilvers@digital-scurf.org>",
    "Diggory Blake <diggsey@googlemail.com>",
]
build = "build.rs"
description = "Manage multiple rust installations with ease"
edition = "2021"
homepage = "https://github.com/rust-lang/rustup"
keywords = ["rustup", "multirust", "install", "proxy"]
license = "MIT OR Apache-2.0"
name = "rustup"
readme = "README.md"
repository = "https://github.com/rust-lang/rustup"
version = "1.26.0"

[features]
curl-backend = ["download/curl-backend"]
default = [
    "curl-backend",
    "reqwest-backend",
    "reqwest-default-tls",
    "reqwest-rustls-tls",
]

reqwest-backend = ["download/reqwest-backend"]
vendored-openssl = ['openssl/vendored']

reqwest-default-tls = ["download/reqwest-default-tls"]
reqwest-rustls-tls = ["download/reqwest-rustls-tls"]

# Include in the default set to disable self-update and uninstall.
no-self-update = []

# Sorted by alphabetic order
[dependencies]
anyhow.workspace = true
cfg-if = "1.0"
chrono = "0.4"
clap = { version = "3", features = ["wrap_help"] }
clap_complete = "3"
download = { path = "download", default-features = false }
effective-limits = "0.5.5"
enum-map = "2.4.2"
flate2 = "1"
git-testament = "0.2"
home = "0.5.4"
lazy_static.workspace = true
libc = "0.2"
num_cpus = "1.15"
opener = "0.5.2"
# Used by `curl` or `reqwest` backend although it isn't imported by our rustup :
# this allows controlling the vendoring status without exposing the presence of
# the download crate.
openssl = { version = "0.10", optional = true }
pulldown-cmark = { version = "0.9", default-features = false }
rand = "0.8"
regex = "1"
remove_dir_all = { version = "0.8.1", features = ["parallel"] }
same-file = "1"
scopeguard = "1"
semver = "1.0"
serde = { version = "1.0", features = ["derive"] }
sha2 = "0.10"
sharded-slab = "0.1.1"
strsim = "0.10"
tar = "0.4.26"
tempfile.workspace = true
# FIXME(issue #1818, #1826, and friends)
term = "=0.5.1"
thiserror.workspace = true
threadpool = "1"
toml = "0.5"
url.workspace = true
wait-timeout = "0.2"
xz2 = "0.1.3"
zstd = "0.12"

[dependencies.retry]
default-features = false
features = ["random"]
version = "1.3.1"

[dependencies.rs_tracing]
features = ["rs_tracing"]
version = "1.1.0"

[target."cfg(windows)".dependencies]
cc = "1"
winreg = "0.11"

[target."cfg(windows)".dependencies.winapi]
features = [
    "combaseapi",
    "errhandlingapi",
    "fileapi",
    "handleapi",
    "ioapiset",
    "jobapi",
    "jobapi2",
    "minwindef",
    "processthreadsapi",
    "psapi",
    "shlobj",
    "shtypes",
    "synchapi",
    "sysinfoapi",
    "tlhelp32",
    "userenv",
    "winbase",
    "winerror",
    "winioctl",
    "winnt",
    "winuser",
]
version = "0.3"

[dev-dependencies]
enum-map = "2.4.2"
once_cell = "1.17.1"
trycmd = "0.14.13"
walkdir = "2"

[build-dependencies]
lazy_static = "1"
regex = "1"

[workspace]
members = ["download"]

[workspace.dependencies]
anyhow = "1.0.69"
lazy_static = "1"
tempfile = "3.4"
thiserror = "1.0"
url = "2.3"

[lib]
name = "rustup"
path = "src/lib.rs"

[profile.release]
codegen-units = 1
lto = true

# Reduce build time by setting proc-macro crates non optimized.
[profile.release.build-override]
opt-level = 0
