# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.85.0"
name = "sccache"
version = "0.16.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Sccache is a ccache-like tool. It is used as a compiler wrapper and avoids compilation when possible. Sccache has the capability to utilize caching in remote storage environments, including various cloud storage options, or alternatively, in local storage."
readme = "README.md"
keywords = ["ccache"]
categories = [
    "command-line-utilities",
    "development-tools::build-utils",
]
license = "Apache-2.0"
repository = "https://github.com/mozilla/sccache/"

[package.metadata.binstall]
bin-dir = "sccache-v{ version }-{ target }/{ bin }{ binary-ext }"
pkg-fmt = "tgz"
pkg-url = "{ repo }/releases/download/v{ version }/sccache-v{ version }-{ target }{ archive-suffix }"

[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
pkg-fmt = "zip"

[package.metadata.binstall.overrides.aarch64-pc-windows-msvc]
pkg-fmt = "zip"

[features]
all = [
    "dist-client",
    "redis",
    "s3",
    "memcached",
    "gcs",
    "azure",
    "gha",
    "webdav",
    "oss",
    "cos",
]
azure = [
    "opendal/services-azblob",
    "reqsign",
    "reqwest",
]
cos = [
    "opendal/services-cos",
    "reqsign",
    "reqwest",
]
default = ["all"]
dist-client = [
    "flate2",
    "hyper",
    "http-body-util",
    "hyper-util",
    "reqwest",
    "url",
    "sha2",
]
dist-server = [
    "jwt",
    "flate2",
    "libmount",
    "nix",
    "openssl",
    "reqwest",
    "rouille",
    "syslog",
    "version-compare",
]
dist-tests = [
    "dist-client",
    "dist-server",
]
gcs = [
    "opendal/services-gcs",
    "reqsign",
    "url",
    "reqwest",
]
gha = [
    "opendal/services-ghac",
    "reqwest",
]
memcached = ["opendal/services-memcached"]
native-zlib = []
oss = [
    "opendal/services-oss",
    "reqsign",
    "reqwest",
]
redis = [
    "url",
    "opendal/services-redis",
]
s3 = [
    "opendal/services-s3",
    "reqsign",
    "reqwest",
]
unstable = []
vendored-openssl = [
    "openssl?/vendored",
    "reqwest?/native-tls-vendored",
]
webdav = [
    "opendal/services-webdav",
    "reqwest",
]

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

[[bin]]
name = "sccache"
path = "src/main.rs"

[[bin]]
name = "sccache-dist"
path = "src/bin/sccache-dist/main.rs"
required-features = ["dist-server"]

[[test]]
name = "cache_hit_rate"
path = "tests/cache_hit_rate.rs"

[[test]]
name = "dist"
path = "tests/dist.rs"

[[test]]
name = "logging"
path = "tests/logging.rs"

[[test]]
name = "oauth"
path = "tests/oauth.rs"

[[test]]
name = "sccache_args"
path = "tests/sccache_args.rs"

[[test]]
name = "sccache_cargo"
path = "tests/sccache_cargo.rs"

[[test]]
name = "sccache_rustc"
path = "tests/sccache_rustc.rs"

[[test]]
name = "system"
path = "tests/system.rs"

[[bench]]
name = "sccache_bench"
path = "benches/sccache_bench.rs"
test = false
harness = false

[dependencies.anyhow]
version = "1.0"
features = ["backtrace"]

[dependencies.ar]
version = "0.9"

[dependencies.async-trait]
version = "0.1"

[dependencies.backon]
version = "1"
features = ["std-blocking-sleep"]
default-features = false

[dependencies.base64]
version = "0.21"

[dependencies.bincode]
version = "1"

[dependencies.blake3]
version = "1"

[dependencies.byteorder]
version = "1.5"

[dependencies.bytes]
version = "1"

[dependencies.chrono]
version = "0.4"

[dependencies.clap]
version = "4.5.13"
features = [
    "derive",
    "env",
    "wrap_help",
]

[dependencies.directories]
version = "6.0"

[dependencies.encoding_rs]
version = "0.8"

[dependencies.env_logger]
version = "0.11"

[dependencies.filetime]
version = "0.2"

[dependencies.flate2]
version = "1.0"
features = ["rust_backend"]
optional = true
default-features = false

[dependencies.fs-err]
version = "3"

[dependencies.futures]
version = "0.3"

[dependencies.gzp]
version = "2"
features = ["deflate_rust"]
default-features = false

[dependencies.http]
version = "1.0"

[dependencies.http-body-util]
version = "0.1"
optional = true

[dependencies.hyper]
version = "1.1"
features = [
    "server",
    "http1",
]
optional = true

[dependencies.hyper-util]
version = "0.1.3"
features = [
    "tokio",
    "server",
]
optional = true

[dependencies.itertools]
version = "0.14"

[dependencies.jobserver]
version = "0.1"

[dependencies.jwt]
version = "9"
optional = true
package = "jsonwebtoken"

[dependencies.libc]
version = "0.2.153"

[dependencies.linked-hash-map]
version = "0.5"

[dependencies.log]
version = "0.4"

[dependencies.memchr]
version = "2"

[dependencies.memmap2]
version = "0.9.4"

[dependencies.mime]
version = "0.3"

[dependencies.nix]
version = "0.30.0"
features = [
    "mount",
    "user",
    "sched",
    "signal",
    "process",
]
optional = true

[dependencies.number_prefix]
version = "0.4"

[dependencies.object]
version = "0.37"

[dependencies.opendal]
version = "0.55.0"
optional = true
default-features = false

[dependencies.openssl]
version = "0.10.75"
optional = true

[dependencies.rand]
version = "0.8.4"

[dependencies.regex]
version = "1.10.3"

[dependencies.reqsign]
version = "0.18.0"
optional = true

[dependencies.reqwest]
version = "0.12"
features = [
    "json",
    "blocking",
    "stream",
    "rustls-tls",
    "rustls-tls-native-roots",
    "trust-dns",
]
optional = true

[dependencies.rouille]
version = "3.6"
features = ["ssl"]
optional = true
default-features = false

[dependencies.semver]
version = "1.0"

[dependencies.serde]
version = "1.0"
features = ["derive"]

[dependencies.serde_json]
version = ">=1.0, <1.0.147"

[dependencies.sha2]
version = "0.10.8"
optional = true

[dependencies.shlex]
version = "1.3.0"

[dependencies.strip-ansi-escapes]
version = "0.2"

[dependencies.syslog]
version = "7"
optional = true

[dependencies.tar]
version = "0.4.40"

[dependencies.tempfile]
version = "3"

[dependencies.tokio]
version = "1"
features = [
    "rt-multi-thread",
    "io-util",
    "time",
    "net",
    "process",
    "macros",
]

[dependencies.tokio-serde]
version = "0.9"

[dependencies.tokio-util]
version = "0.7"
features = [
    "codec",
    "io",
]

[dependencies.toml]
version = "0.9"

[dependencies.tower-service]
version = "0.3"

[dependencies.typed-path]
version = "0.12.0"

[dependencies.url]
version = "2"
optional = true

[dependencies.uuid]
version = "1.9"
features = ["v4"]

[dependencies.version-compare]
version = "0.1.1"
optional = true

[dependencies.walkdir]
version = "2"

[dependencies.which]
version = "6"
default-features = false

[dependencies.zip]
version = "0.6"
default-features = false

[dependencies.zstd]
version = "0.13"

[dev-dependencies.assert_cmd]
version = "2.0.13"

[dev-dependencies.cc]
version = "1.0"

[dev-dependencies.chrono]
version = "0.4.42"

[dev-dependencies.divan]
version = "4"
package = "codspeed-divan-compat"

[dev-dependencies.filetime]
version = "0.2"

[dev-dependencies.predicates]
version = "=3.1.0"

[dev-dependencies.serial_test]
version = "3.1"

[dev-dependencies.temp-env]
version = "0.3.6"

[dev-dependencies.test-case]
version = "3.3.1"

[dev-dependencies.thirtyfour]
version = "0.36"

[target.'cfg(not(target_os = "freebsd"))'.dependencies.libmount]
version = "0.1.15"
optional = true

[target."cfg(unix)".dependencies.daemonix]
version = "0.1"

[target."cfg(windows)".dependencies.windows-sys]
version = "0.52"
features = [
    "Win32_Foundation",
    "Win32_Globalization",
    "Win32_Storage_FileSystem",
    "Win32_System_Threading",
    "Win32_System_Console",
    "Win32_Security",
]

[lints.clippy]
cloned_instead_of_copied = "warn"
cloned_ref_to_slice_refs = "warn"
explicit_into_iter_loop = "warn"
from_iter_instead_of_collect = "warn"
implicit_clone = "warn"
manual_string_new = "warn"
ptr_as_ptr = "warn"
ref_option = "warn"
semicolon_if_nothing_returned = "warn"
unnecessary_semicolon = "warn"

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

[profile.test]
debug = 0
