[package]
name = "rise-deploy"
version = "0.19.1"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/NiklasRosenstein/rise"
description = "A simple and powerful CLI for deploying containerized applications"

[package.metadata.cargo-all-features]
# Always include the default cli feature to avoid testing empty feature set
always_include_features = ["cli"]

[package.metadata.dist]
cargo-dist-version = "0.31.0"
ci = []
installers = []
targets = [
    "x86_64-unknown-linux-gnu",
    "x86_64-apple-darwin",
    "aarch64-apple-darwin",
]
pr-run-mode = "skip"

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

[features]
default = ["cli"]
cli = [
    "dep:clap",
    "dep:comfy-table",
    "dep:dirs",
    "dep:tempfile",
    "dep:toml",
    "dep:url",
    "dep:webbrowser",
    "dep:serde_ignored",
]
backend = [
    # Server core (former "server" feature)
    "dep:config",
    "dep:openssl",
    "dep:rsa",
    "dep:sqlx",
    "dep:tower",
    "dep:tower-http",
    "dep:lazy_static",
    "dep:regex",
    "dep:aes-gcm",
    "dep:moka",
    "dep:base64ct",
    "dep:async-trait",
    "dep:oci-distribution",
    "dep:thiserror",
    "dep:mime_guess",
    "dep:tera",
    "dep:serde_ignored",
    "dep:subtle",
    "dep:serde_urlencoded",
    "dep:schemars",
    # Kubernetes (former "k8s" feature)
    "dep:kube",
    "dep:k8s-openapi",
    "dep:rustls",
    # AWS services (former "aws" feature)
    "dep:aws-config",
    "dep:aws-sdk-ecr",
    "dep:aws-sdk-kms",
    "dep:aws-sdk-rds",
    "dep:aws-sdk-sts",
    # Snowflake (former "snowflake" feature)
    "dep:snowflake-connector-rs",
]

[dependencies]
# Common (always enabled - shared across features)
anyhow = "1.0.100"
async-stream = "0.3"
base64 = "0.22"
bytes = "1.9"
chrono = { version = "0.4.38", features = ["serde"] }
futures = "0.3"
rand = "0.10.0"
reqwest = { version = "0.13.0", features = ["json", "stream", "form"] }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.145"
tokio = { version = "1.48.0", features = ["full"] }
tokio-util = { version = "0.7", features = ["io"] }
tracing = "0.1.43"
tracing-subscriber = { version = "0.3.22", features = ["env-filter"] }
uuid = { version = "1.18.1", features = ["v4", "serde"] }

# Shared: CLI + Server
axum = "0.8.7"
jsonwebtoken = { version = "10.0", features = ["rust_crypto"] }
sha2 = "0.11"
urlencoding = "2.1"

# CLI-only dependencies
clap = { version = "4.5.53", features = ["derive"], optional = true }
comfy-table = { version = "7.1", optional = true }
dirs = { version = "6.0", optional = true }
rsa = { version = "0.9", optional = true }
tempfile = { version = "3.0", optional = true }
toml = { version = "1", optional = true }
url = { version = "2.5", optional = true }
webbrowser = { version = "1.0.2", optional = true }
serde_ignored = { version = "0.1", optional = true }

# Server core dependencies
config = { version = "0.15.19", optional = true }
openssl = { version = "0.10.75", features = ["vendored"], optional = true }
sqlx = { version = "0.8", features = ["runtime-tokio-native-tls", "postgres", "uuid", "chrono", "migrate"], optional = true }
tower = { version = "0.5.2", optional = true }
tower-http = { version = "0.6.7", features = ["trace", "cors"], optional = true }
lazy_static = { version = "1.5.0", optional = true }
regex = { version = "1.11", optional = true }

# Server: Encryption (non-KMS mode)
aes-gcm = { version = "0.10", optional = true }

# Server: OAuth2 proxy
moka = { version = "0.12", features = ["sync", "future"], optional = true }
base64ct = { version = "1.6", features = ["alloc"], optional = true }

# Server: OCI registry
async-trait = { version = "0.1", optional = true }
oci-distribution = { version = "0.11", optional = true }
thiserror = { version = "2.0", optional = true }

# Server: Frontend
mime_guess = { version = "2.0", optional = true }
tera = { version = "1.20", optional = true }

# AWS feature dependencies
aws-config = { version = "1.5", features = ["behavior-version-latest"], optional = true }
aws-sdk-ecr = { version = "1.80", optional = true }
aws-sdk-kms = { version = "1.80", optional = true }
aws-sdk-rds = { version = "1.80", optional = true }
aws-sdk-sts = { version = "1.80", optional = true }

# Kubernetes feature dependencies
kube = { version = "3", features = ["client", "runtime", "derive"], optional = true }
k8s-openapi = { version = "0.27", features = ["v1_31", "schemars"], optional = true }
rustls = { version = "0.23", features = ["ring"], optional = true }

# Snowflake feature dependencies
snowflake-connector-rs = { version = "0.9", optional = true }

# Server: OAuth2 token endpoint
subtle = { version = "2.6.1", optional = true }
serde_urlencoded = { version = "0.7.1", optional = true }
schemars = { version = "1", optional = true }

[dev-dependencies]
tempfile = "3.0"

# The profile that 'dist' will build with
[profile.dist]
inherits = "release"
lto = "thin"
