[package]
name = "fynd-rpc-types"
version.workspace = true
edition = "2021"
description = "Shared DTO types for the Fynd RPC API (request/response wire format)"
license = "MIT"
readme = "README.md"

[features]
openapi = ["dep:utoipa"]
core = ["dep:fynd-core", "dep:tycho-simulation"]

[lints.clippy]
# `Into` is implemented directly (rather than `From`) for the DTO→Core direction because
# the orphan rule prevents implementing `From<DTO>` on external fynd_core types.
from_over_into = "allow"

[dependencies]
serde.workspace = true
serde_json.workspace = true
serde_with.workspace = true
num-bigint.workspace = true
uuid.workspace = true
bytes.workspace = true
hex.workspace = true

# Optional: OpenAPI schema generation (used by fynd-rpc server)
utoipa = { version = "5", optional = true }
# Optional: conversions to/from fynd-core domain types (also enables tycho-simulation for conversions)
fynd-core = { workspace = true, optional = true }
tycho-simulation = { workspace = true, optional = true }
