[package]
name = "leptos_macro"
version = "0.8.11"
authors = ["Greg Johnston"]
license = "MIT"
repository = "https://github.com/leptos-rs/leptos"
description = "view macro for the Leptos web framework."
readme = "../README.md"
rust-version.workspace = true
edition.workspace = true

[lib]
proc-macro = true

[dependencies]
attribute-derive = { features = [
  "syn-full",
], workspace = true, default-features = true }
cfg-if = { workspace = true, default-features = true }
html-escape = { workspace = true, default-features = true }
itertools = { workspace = true, default-features = true }
prettyplease = { workspace = true, default-features = true }
proc-macro-error2 = { default-features = false, workspace = true }
proc-macro2 = { workspace = true, default-features = true }
quote = { workspace = true, default-features = true }
syn = { features = ["full"], workspace = true, default-features = true }
rstml = { workspace = true, default-features = true }
leptos_hot_reload = { workspace = true }
server_fn_macro = { workspace = true }
convert_case = { workspace = true, default-features = true }
uuid = { features = ["v4"], workspace = true, default-features = true }
tracing = { optional = true, workspace = true, default-features = true }

[dev-dependencies]
log = { workspace = true, default-features = true }
typed-builder = { workspace = true, default-features = true }
trybuild = { workspace = true, default-features = true }
leptos = { path = "../leptos" }
leptos_router = { path = "../router", features = ["ssr"] }
server_fn = { path = "../server_fn", features = ["cbor"] }
insta = { workspace = true, default-features = true }
serde = { workspace = true, default-features = true }

[build-dependencies]
rustc_version = { workspace = true, default-features = true }

[features]
csr = []
hydrate = []
ssr = ["server_fn_macro/ssr"]
nightly = ["server_fn_macro/nightly"]
tracing = ["dep:tracing"]
islands = []
trace-components = []
trace-component-props = []
actix = ["server_fn_macro/actix"]
axum = ["server_fn_macro/axum"]
generic = ["server_fn_macro/generic"]
# Having an erasure feature rather than normal --cfg erase_components for the proc macro crate is a workaround for this rust issue:
# https://github.com/rust-lang/cargo/issues/4423
# TLDR proc macros will ignore RUSTFLAGS when --target is specified on the cargo command.
# This works around the issue by the non proc-macro crate which does see RUSTFLAGS enabling the replacement feature on the proc-macro crate, which wouldn't.
# This is automatic as long as the leptos crate is depended upon,
# downstream usage should never manually enable this feature.
__internal_erase_components = []

[package.metadata.cargo-all-features]
denylist = ["tracing", "trace-component-props", "trace-components"]
skip_feature_sets = [
  [
    "csr",
    "hydrate",
  ],
  [
    "hydrate",
    "csr",
  ],
  [
    "hydrate",
    "ssr",
  ],
  [
    "actix",
    "axum",
  ],
  [
    "actix",
    "generic",
  ],
  [
    "generic",
    "axum",
  ],
  [
    "nightly",
  ],
]
max_combination_size = 2

[package.metadata.docs.rs]
rustdoc-args = ["--generate-link-to-definition"]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rustc_nightly)'] }
