[package]
name = "ghost-cli"
description = "Implementation of the Ghost Client Node in Rust"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true

[package.metadata.wasm-pack.profile.release]
# `wasm-opt` has some problems on Linux, see
# https://github.com/rustwasm/wasm-pack/issues/781 etc.
wasm-opt = false

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
cfg-if = { workspace = true }
clap = { workspace = true, features = ["derive"], optional = true }
log = { workspace = true, default-features = false }
serde_json = { workspace = true, default-features = false }
thiserror = { workspace = true }
futures = { workspace = true }
pyro = { workspace = true, optional = true }
pyroscope_pprofrs = { workspace = true, optional = true }

service = { workspace = true, optional = true }
ghost-client-cli = { workspace = true, optional = true }
ghost-machine-primitives = { workspace = true, optional = true }

sp-core = { workspace = true, default-features = true }
sp-io = { workspace = true, default-features = true }
sp-runtime = { workspace = true, default-features = true }
sp-maybe-compressed-blob = { workspace = true, default-features = true }
keyring = { workspace = true, default-features = true }
frame-benchmarking-cli = { workspace = true, default-features = true, optional = true }
sc-cli = { workspace = true, default-features = true, optional = true }
sc-service = { workspace = true, default-features = true, optional = true }
ghost-metrics = { workspace = true, default-features = true }
primitives = { workspace = true, default-features = true }
sc-tracing = { workspace = true, default-features = true, optional = true }
sc-sysinfo = { workspace = true, default-features = true }
sc-executor = { workspace = true, default-features = true }
sc-storage-monitor = { workspace = true, default-features = true }

[build-dependencies]
substrate-build-script-utils = { workspace = true }

[features]
default = ["cli", "db", "full-node"]
db = ["service/db"]
cli = [
    "clap",
    "frame-benchmarking-cli",
    "sc-cli",
    "sc-service",
    "sc-tracing",
    "service",
    "ghost-client-cli",
    "ghost-machine-primitives",
]
runtime-benchmarks = [
    "frame-benchmarking-cli?/runtime-benchmarks",
    "ghost-metrics/runtime-benchmarks",
    "sc-service?/runtime-benchmarks",
    "service/runtime-benchmarks",
    "sp-runtime/runtime-benchmarks",
]
full-node = ["service/full-node"]
try-runtime = [
    "service/try-runtime",
    "sp-runtime/try-runtime",
]
fast-runtime = ["service/fast-runtime"]
pyroscope = ["pyro", "pyroscope_pprofrs"]

# Configure the native runtimes to use
ghost-native = []
casper-native = ["service/casper-native"]
