Cargo Features

postcard-rpc has no features set by default.

[dependencies]
postcard-rpc = { version = "0.10.7", features = ["use-std", "test-utils", "cobs-serial", "raw-nusb", "webusb", "embassy-usb-0_3-server", "defmt"] }
use-std raw-nusb? test-utils? webusb?

Enables maitake-sync, ssmarshal, thiserror ^1.0, tokio, tracing, and trait-variant, use-std of postcard and postcard-schema

Affects hash::fnv1a64_owned, postcard-rpc::host_client, standard_icd::OwnedSchemaData

test-utils = use-std

Enables use-std of postcard-schema

Affects host_client::test_channels, embassy_usb_v0_3::fake, impls::test_channels

cobs-serial

Cobs Serial support.

Works on: Win, Mac, Linux
Does NOT work on: WASM

Enables tokio-serial, use_std of cobs

raw-nusb = use-std

Raw (bulk) USB support

Works on: Win, Mac, Linux
Does NOT work on: WASM

Enables nusb

webusb = use-std

WebUSB support

Works on: WASM Does NOT work on: Win, Mac, Linux

NOTE: Requires the following in your .cargo/config.toml, or otherwise activated via RUSTFLAGS:

[target.wasm32-unknown-unknown]
rustflags = "--cfg=web_sys_unstable_apis"

Enables gloo, js-sys, serde_json, wasm-bindgen, wasm-bindgen-futures, and web-sys

Affects host_client::webusb

embassy-usb-0_3-server

Enables embassy-executor, embassy-futures, embassy-sync, embassy-time, embassy-usb, embassy-usb-driver, and static_cell

Affects impls::embassy_usb_v0_3

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

cobs cobs-serial?

Affects postcard-rpc::accumulator

defmt implicit feature