[package]
name = "postcard-rpc"
version = "0.11.7"
authors = ["James Munns <james@onevariable.com>"]
edition = "2021"
repository = "https://github.com/jamesmunns/postcard-rpc"
description = "A no_std + serde compatible RPC library for Rust"
license = "MIT OR Apache-2.0"
categories = ["embedded", "no-std"]
keywords = ["serde", "cobs", "framing"]
documentation = "https://docs.rs/postcard-rpc/"
readme = "../../README.md"
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "doc_cfg"]
features = [
"test-utils",
"use-std",
"cobs-serial",
"raw-nusb",
"embassy-usb-0_3-server",
"_docs-fix",
]
[dependencies]
cobs = { version = "0.2.3", optional = true, default-features = false }
defmt = { version = "0.3.5", optional = true }
heapless = "0.8.0"
postcard = { version = "1.0.10" }
serde = { version = "1.0.192", default-features = false, features = ["derive"] }
postcard-schema = { version = "0.2.1", features = ["derive"] }
[dependencies.nusb]
version = "0.1"
optional = true
[dependencies.tokio-serial]
version = "5.4.4"
optional = true
[dependencies.maitake-sync]
version = "0.1.2"
optional = true
[dependencies.tokio]
version = "1.33.0"
features = ["sync", "rt", "macros", "io-util", "time"]
optional = true
[dependencies.tracing]
version = "0.1"
optional = true
[dependencies.js-sys]
version = "0.3.69"
optional = true
[dependencies.thiserror]
version = "1.0"
optional = true
[dependencies.web-sys]
version = "0.3.69"
optional = true
features = [
"Element",
"Navigator",
'Usb',
'UsbDeviceRequestOptions',
'UsbDevice',
'UsbInTransferResult',
'UsbControlTransferParameters',
'UsbOutTransferResult',
'UsbRecipient',
'UsbRequestType',
"UsbTransferStatus",
]
[dependencies.gloo]
version = "0.11.0"
optional = true
[dependencies.serde_json]
version = "1.0"
optional = true
[dependencies.wasm-bindgen]
version = "0.2.92"
optional = true
[dependencies.wasm-bindgen-futures]
version = "0.4.42"
optional = true
[dependencies.trait-variant]
version = "0.1.2"
optional = true
[dependencies.embassy-usb-0_3]
package = "embassy-usb"
version = "0.3"
optional = true
[dependencies.embassy-usb-0_4]
package = "embassy-usb"
version = "0.4"
optional = true
[dependencies.embassy-usb-driver]
version = "0.1"
optional = true
[dependencies.embassy-sync]
version = "0.6"
optional = true
[dependencies.static_cell]
version = "2.1"
optional = true
[dependencies.embassy-executor]
version = "0.7"
optional = true
[dependencies.embassy-futures]
version = "0.1"
optional = true
[dependencies.embassy-time]
version = "0.4"
optional = true
[dependencies.portable-atomic]
version = "1.0"
default-features = false
[dev-dependencies]
postcard-rpc = { path = "../postcard-rpc", features = ["test-utils"] }
[dependencies.ssmarshal]
version = "1.0"
optional = true
features = ["std"]
[features]
default = []
test-utils = ["use-std", "postcard-schema/use-std"]
use-std = [
"dep:maitake-sync",
"dep:tokio",
"postcard/use-std",
"postcard-schema/use-std",
"dep:thiserror",
"dep:tracing",
"dep:trait-variant",
"dep:ssmarshal",
]
cobs-serial = ["cobs/use_std", "dep:tokio-serial"]
raw-nusb = ["dep:nusb", "use-std"]
webusb = [
"dep:gloo",
"dep:web-sys",
"dep:serde_json",
"dep:wasm-bindgen",
"dep:wasm-bindgen-futures",
"dep:js-sys",
"use-std",
]
embassy-usb-0_3-server = [
"dep:embassy-usb-0_3",
"dep:embassy-sync",
"dep:static_cell",
"dep:embassy-usb-driver",
"dep:embassy-executor",
"dep:embassy-time",
"dep:embassy-futures",
]
embassy-usb-0_4-server = [
"dep:embassy-usb-0_4",
"dep:embassy-sync",
"dep:static_cell",
"dep:embassy-usb-driver",
"dep:embassy-executor",
"dep:embassy-time",
"dep:embassy-futures",
]
_docs-fix = ["dep:ssmarshal"]