Problem
async-trait is declared as an unconditional dependency in crates/rmcp/Cargo.toml, but
every use of it sits behind non-default features:
CredentialStore / StateStore (transport/auth.rs) — feature auth
EventStore / SessionStore (session/store.rs) — feature transport-streamable-http-server-session
Default features (base64, macros, server) pull in neither, yet the proc-macro crate
still compiles for every consumer:
$ cargo tree -p rmcp -e normal --no-default-features --features base64,macros,server -i async-trait
async-trait (proc-macro)
└── rmcp
Proposal
# crates/rmcp/Cargo.toml
async-trait = { version = "0.1.89", optional = true }
[features]
auth = [..., "dep:async-trait"]
transport-streamable-http-server-session = [..., "dep:async-trait"]
Dev-dependency stays as-is (used directly by the event/session store integration tests).
Non-breaking, no public API change — trims the default build graph only.
Problem
async-traitis declared as an unconditional dependency incrates/rmcp/Cargo.toml, butevery use of it sits behind non-default features:
CredentialStore/StateStore(transport/auth.rs) — featureauthEventStore/SessionStore(session/store.rs) — featuretransport-streamable-http-server-sessionDefault features (
base64,macros,server) pull in neither, yet the proc-macro cratestill compiles for every consumer:
Proposal
Dev-dependency stays as-is (used directly by the event/session store integration tests).
Non-breaking, no public API change — trims the default build graph only.