[package]
name = "rialo-modular-config"
description = "Rialo Modular Config"
version = { workspace = true }
authors = ["Subzero Labs <build@subzero.xyz>"]
license = "Apache-2.0"
publish = ["crates-io"]
edition = "2021"

[features]
default = ["file-system", "environment-vars"]
file-system = ["toml", "serde_yaml"]
environment-vars = []
schema = ["jsonschema"]

[dependencies]
anyhow = { workspace = true }
indexmap = { workspace = true, features = ["serde"] }
serde = { workspace = true }
serde_json = { workspace = true }
serde_yaml = { workspace = true, optional = true }
toml = { workspace = true, optional = true }
tracing = { workspace = true }

# Target-specific dependencies for jsonschema
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
jsonschema = { workspace = true, features = [
    "resolve-http",
    "resolve-file",
], optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
jsonschema = { workspace = true, optional = true }

[lints]
workspace = true
