[package]
authors                = ["Adam Nelson <anelson@apocryph.org>"]
categories             = ["command-line-utilities", "development-tools"]
description            = "Core library for cgx, the Rust equivalent of uvx or npx for running Rust crates quickly and easily"
edition.workspace      = true
homepage.workspace     = true
license.workspace      = true
name                   = "cgx-core"
readme                 = "../README.md"
repository.workspace   = true
rust-version.workspace = true
version                = "0.0.11"

[package.metadata.cargo-machete]
ignored = [
  # This is used in a `#[serde(with = "...")]` attribute, cargo-machete seems unable to detect this
  "humantime-serde",
  # These are declared only for the musl target to turn on static-vendoring features (via Cargo
  # feature unification) on the openssl-sys/libcurl that gix's curl transport pulls in. They are
  # never used directly from our code, so cargo-machete can't see why they're here.
  "openssl-sys",
  "curl",
]

[dependencies]
backon          = { workspace = true }
build-context   = { workspace = true }
bytes           = { workspace = true }
bzip2           = { workspace = true }
cargo_metadata  = { workspace = true }
chrono          = { workspace = true }
clap            = { workspace = true }
etcetera        = { workspace = true }
figment         = { workspace = true }
flate2          = { workspace = true }
gix             = { workspace = true }
home            = { workspace = true }
humantime       = { workspace = true }
humantime-serde = { workspace = true }
ignore          = { workspace = true }
reqwest         = { workspace = true }
semver          = { workspace = true }
serde           = { workspace = true }
serde-cyclonedx = { workspace = true }
serde_json      = { workspace = true }
sha2            = { workspace = true }
shellexpand     = { workspace = true }
snafu           = { workspace = true }
strum           = { workspace = true, features = ["derive"] }
tame-index      = { workspace = true }
tar             = { workspace = true }
tempfile        = { workspace = true }
toml            = { workspace = true }
tracing         = { workspace = true }
url             = { workspace = true }
uuid            = { workspace = true }
which           = { workspace = true }
xz2.workspace   = true
zip.workspace   = true
zstd.workspace  = true

[target.'cfg(windows)'.dependencies]
ctrlc = { workspace = true }

# vendor OpenSSL + libcurl statically for musl only.
# Feature unification turns on `vendored` for the openssl-sys that curl-sys already
# pulls, and static-curl/static-ssl build libcurl+OpenSSL from source.
# This will hopefully allow us to successfully cross-compile for linux musl in the cargo-dist
# builds.
[target.'cfg(target_env = "musl")'.dependencies]
curl        = { workspace = true, features = ["static-curl", "static-ssl"] }
openssl-sys = { workspace = true, features = ["vendored"] }

[dev-dependencies]
assert-json-diff   = { workspace = true }
assert_matches     = { workspace = true }
httpmock           = { workspace = true }
insta              = { workspace = true }
rand               = { workspace = true }
sealed_test        = { workspace = true }
tracing-subscriber = { workspace = true }

[lints]
workspace = true
