Cargo Features

[dependencies]
mcpkit-transport = { version = "0.5.0", default-features = false, features = ["full", "tokio-runtime", "smol-runtime", "http", "websocket", "grpc", "opentelemetry", "prometheus", "async-std", "async-std-runtime"] }
default = tokio-runtime

The tokio-runtime feature is set by default whenever mcpkit-transport is added without default-features = false somewhere in the dependency tree.

full = grpc, http, opentelemetry, prometheus, websocket
tokio-runtime default grpc? http? opentelemetry? websocket? = tokio

Affects runtime::Sender, runtime::Receiver, runtime::channel, runtime::stdin, runtime::stdout, runtime::TokioAsyncReadWrapper, runtime::TokioAsyncWriteWrapper, runtime::spawn, runtime::sleep, runtime::timeout, spawn::SpawnedTransport, spawn::SpawnedTransportBuilder, windows::NamedPipeTransport, windows::NamedPipeServer, memory::MemoryTransport, stdio::StdioTransport

smol-runtime async-std? async-std-runtime? = async-io, smol

Affects runtime::Sender, runtime::Receiver, runtime::channel, runtime::stdin, runtime::stdout, runtime::spawn, runtime::sleep, runtime::timeout, memory::MemoryTransport, stdio::StdioTransport

http full? = axum, hyper, reqwest, tokio-runtime
websocket full? = tokio-runtime, tokio-tungstenite

Affects server::WebSocketListener, server::AcceptedConnection

grpc full? = prost, prost-build, protobuf-src, tokio-runtime, tokio-stream, tonic, tonic-build

Affects mcpkit-transport::grpc

opentelemetry full? = tokio-runtime

Enables opentelemetry, opentelemetry-otlp, opentelemetry_sdk, tracing-opentelemetry, and tracing-subscriber

opentelemetry:

OpenTelemetry integration (optional)

Affects telemetry::otel

prometheus full?

Enables prometheus

Prometheus metrics (optional)

Affects telemetry::prom

async-std = smol-runtime

Deprecated feature aliases for backwards compatibility These map to smol-runtime since async-std was replaced by smol

async-std-runtime = smol-runtime

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.

tokio tokio-runtime

Enables tokio

Runtime-specific dependencies

smol smol-runtime?
async-io smol-runtime?
reqwest http?

Enables reqwest ^0.12

HTTP transport

axum http?
hyper http?
tokio-tungstenite websocket?

Enables tokio-tungstenite ^0.24

WebSocket transport

tonic grpc?

Enables tonic ^0.12

gRPC transport

prost grpc?

Enables prost ^0.13

tokio-stream grpc?
tonic-build build grpc?

Enables tonic-build ^0.12

prost-build build grpc?

Enables prost-build ^0.13

protobuf-src build grpc?