Cargo Features

[dependencies]
toy-rpc = { version = "0.10.0", default-features = false, features = ["server", "client", "tls", "ws_tokio", "ws_async_std", "docs", "serde_bincode", "serde_rmp", "tokio_runtime", "async_std_runtime", "http_tide", "http_warp", "http_axum", "serde_json", "serde_cbor", "hyper", "tower-service", "anyhow"] }
default = serde_bincode

The serde_bincode feature is set by default whenever toy-rpc is added without default-features = false somewhere in the dependency tree.

server http_axum? http_tide? http_warp?

Enables server of toy-rpc-macros

Affects toy-rpc::server

client

Enables client of toy-rpc-macros

Affects toy-rpc::client, toy-rpc::DEFAULT_RPC_PATH

tls = futures-rustls, rustls, tokio-rustls, webpki
ws_tokio http_axum? http_warp? = tungstenite

Enables tokio-runtime of async-tungstenite ^0.25

ws_async_std http_tide? = tungstenite

Enables async-std-runtime of async-tungstenite ^0.25

docs
serde_bincode default

feature flags for codec

serde_rmp = rmp-serde
tokio_runtime http_axum? http_warp? = tokio, tokio-stream

feature flags for runtime

Enables tokio of brw, runtime of toy-rpc-macros

async_std_runtime http_tide? = async-std

Enables async-std of brw, runtime of toy-rpc-macros

http_tide = async_std_runtime, server, tide, tide-websockets, ws_async_std

Affects toy-rpc::DEFAULT_RPC_PATH

http_warp = server, tokio_runtime, warp, ws_tokio

Affects toy-rpc::DEFAULT_RPC_PATH

http_axum = axum, bytes, http-body, server, tokio_runtime, ws_tokio

Affects toy-rpc::DEFAULT_RPC_PATH

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.

serde_json implicit feature

Enables serde_json

feature gated optional dependecies

serde_cbor implicit feature

Enables serde_cbor

serde_cbor:

CBOR support for serde

rmp-serde serde_rmp?
tide http_tide?
tide-websockets http_tide?
warp http_warp?
axum http_axum?
hyper implicit feature

Enables hyper

hyper:

A protective and efficient HTTP library for all

http-body http_axum?
bytes http_axum?
tower-service implicit feature

Enables tower-service

tower-service:

Trait representing an asynchronous, request / response based, client or server

async-std async_std_runtime?
tokio tokio_runtime?
tokio-stream tokio_runtime?
tokio-rustls tls?
futures-rustls tls?
rustls tls?
webpki tls?
anyhow implicit feature

Enables anyhow

anyhow:

Flexible concrete Error type built on std::error::Error

tungstenite ws_async_std? ws_tokio?

Enables tungstenite ^0.21

async-tungstenite ws_async_std? ws_tokio?

Enables async-tungstenite ^0.25