[package] name = "rpc-it" version = "0.10.0-alpha.1" edition = "2021" repository = "https://github.com/kang-sw/rpc-it-rs" authors = ["kang-sw "] description = "RPC library for my own demand." license = "MIT" exclude = ["doc/"] [workspace] members = ["macros"] # --------------------------------------------- Deps --------------------------------------------- # [dependencies] thiserror = "1" serde = "1.0" rand = "0.8" bytes = "1.4.0" mpsc = { package = "async-channel", version = "2" } parking_lot = "0.12.1" hashbrown = "0.14.3" futures = "0.3" assert = { version = "1.1.0", package = "static_assertions" } serde_json = { version = "1", optional = true, features = ["raw_value"] } crossbeam-queue = { version = "0.3", optional = true } anyhow = { version = "1.0.79", optional = true } erased-serde = { version = "0.4", optional = true } rmp = { version = "0.8", optional = true } rmp-serde = { version = "1", optional = true } postcard = { version = "1", optional = true } [dependencies.rpc-it-macros] path = "./macros" version = "0.10.0-alpha.1" optional = true default-features = false [dev-dependencies] anyhow = "1.0.79" enum-as-inner = "0.6.0" serde = { version = "1.0", features = ["derive"] } tap = "1.0.1" [features] default = ["proc-macro", "detailed-parse-errors"] # Enable full RPC support full = ["jsonrpc", "msgpack-rpc", "dynamic-codec", "in-memory-io", "rawrpc"] # Enable dynamic codec support dynamic-codec = ["dep:erased-serde"] # Enable detailed error message for deserialization # # For servers, disabling this would be more benefitial as creating error object for every mismatched # protocols would be pretty costly, which involves creating a new error object and serializing it # everytime. detailed-parse-errors = ["dep:anyhow"] # Enable proc-macro support proc-macro = ["dep:rpc-it-macros"] # Add JSONRPC support to the library jsonrpc = ["dep:serde_json"] # Add msgpack-rpc support to the library msgpack-rpc = ["dep:rmp", "dep:rmp-serde"] # Internal highspeed unstable RPC protocol. This protocol only guarantees compatibility between same # `rpc-it` crate minor versions. rawrpc = ["dep:postcard"] # Adds in-memory-io default IO support in-memory-io = ["dep:crossbeam-queue"]