[package]
name = "multi-rpc"
version = "0.3.1"
edition = "2021"
description = "Define a Rust service trait once and serve it simultaneously over multiple RPC protocols like Tarpc, REST/Axum, and JSON-RPC."
license = "Apache-2.0"
repository = "https://github.com/dan-da/multi-rpc"
homepage = "https://github.com/dan-da/multi-rpc"
readme = "README.md"
keywords = ["rpc", "axum", "tarpc", "json-rpc", "macros"]
categories = ["network-programming", "web-programming"]

[dependencies]
# Local workspace crates do not use the workspace.dependencies table
multi-rpc-macros = { version = "0.3.1", path = "../multi-rpc-macros", default-features = false }

# Inherited dependencies
futures = { workspace = true }
tokio = { workspace = true }
thiserror = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
trait-variant = { workspace = true }

# Optional Protocol Dependencies (still need to be marked optional)
tarpc = { workspace = true, optional = true }
axum = { workspace = true, optional = true }
jsonrpsee = { workspace = true, optional = true }

[features]
default = []
tarpc = ["dep:tarpc", "multi-rpc-macros/tarpc"]
rest-axum = ["dep:axum", "multi-rpc-macros/rest-axum"]
jsonrpsee = ["dep:jsonrpsee", "multi-rpc-macros/jsonrpsee"]
