[package]
name = "blueprint-tee"
version = "0.2.0-alpha.1"
description = "First-class TEE (Trusted Execution Environment) support for the Blueprint SDK"
authors.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
rust-version.workspace = true

[lints]
workspace = true

[dependencies]
# Blueprint core
blueprint-core = { workspace = true, features = ["tracing"] }
blueprint-std = { workspace = true }

# Async runtime
tokio = { workspace = true, features = ["sync", "rt", "macros", "time"] }
futures = { workspace = true }
futures-core = { workspace = true }

# Tower middleware
tower = { workspace = true }
pin-project-lite = { workspace = true }

# Error handling & logging
thiserror = { workspace = true }
tracing = { workspace = true }

# Serialization
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true, features = ["std"] }

# Crypto
rand = { workspace = true, features = ["std", "std_rng"] }
sha2 = { workspace = true, features = ["std"] }
hex = { workspace = true, features = ["std"] }
zeroize = { workspace = true }
x25519-dalek = { workspace = true, features = ["getrandom"] }
chacha20poly1305 = { workspace = true, features = ["alloc", "getrandom"] }

# Utilities
document-features = { workspace = true, features = ["default"] }

# Cloud providers (feature-gated)
aws-sdk-ec2 = { workspace = true, optional = true }
aws-config = { workspace = true, optional = true }
gcp_auth = { workspace = true, optional = true }
reqwest = { workspace = true, features = ["json"], optional = true }
base64 = { workspace = true, features = ["std"], optional = true }
uuid = { workspace = true, features = ["v4"], optional = true }

[dev-dependencies]
tokio = { workspace = true, features = ["full"] }
blueprint-router = { workspace = true }

[features]
default = ["std", "test-utils"]

#! ### Core

## Enable standard library support
std = ["blueprint-core/std", "blueprint-std/std"]

#! ### TEE Providers

## Enable AWS Nitro Enclave runtime backend and attestation verification.
## Adds `aws-sdk-ec2` and `aws-config` for EC2 instance management.
aws-nitro = ["dep:aws-sdk-ec2", "dep:aws-config", "dep:base64", "dep:uuid"]

## Enable Azure SEV-SNP / SKR runtime backend and attestation verification.
## Adds `reqwest` for ARM REST API and MAA token retrieval.
azure-snp = ["dep:reqwest", "dep:base64", "dep:uuid"]

## Enable GCP Confidential Space runtime backend and attestation verification.
## Adds `gcp-auth` for service account auth and `reqwest` for Compute Engine API.
gcp-confidential = ["dep:gcp_auth", "dep:reqwest", "dep:uuid"]

## Enable Intel TDX attestation verification
tdx = []

## Enable AMD SEV-SNP attestation verification
sev-snp = []

## Enable all provider backends
all-providers = ["aws-nitro", "azure-snp", "gcp-confidential", "tdx", "sev-snp"]

## Enable test utilities (e.g., VerifiedAttestation::new_for_test)
test-utils = []

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
