Skip to content

chore: make async-trait optional - #1119

Open
DaleSeo wants to merge 1 commit into
mainfrom
fix/optional-async-trait
Open

chore: make async-trait optional#1119
DaleSeo wants to merge 1 commit into
mainfrom
fix/optional-async-trait

Conversation

@DaleSeo

@DaleSeo DaleSeo commented Aug 3, 2026

Copy link
Copy Markdown
Member

Closes #1112.

Motivation and Context

The default rmcp feature set does not compile any code that uses async-trait, but the unconditional dependency still adds the proc-macro crate to every consumer's build graph. Moving the dependency behind the two features that use it keeps the build graph smaller without changing the public API or runtime behavior.

This PR makes async-trait optional. Consumers that do not enable OAuth or streamable HTTP server sessions will no longer compile an unused proc macro. The auth and transport-streamable-http-server-session features now enable the dependency explicitly.

How Has This Been Tested?

  • Verified async-trait is absent with --no-default-features --features base64,macros,server.
  • Verified async-trait is present with auth and transport-streamable-http-server-session independently.

Breaking Changes

None. Existing features continue to enable async-trait wherever it is required.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

@github-actions github-actions Bot added T-dependencies Dependencies related changes T-config Configuration file changes labels Aug 3, 2026
@DaleSeo
DaleSeo marked this pull request as ready for review August 3, 2026 18:59
@DaleSeo
DaleSeo requested a review from a team as a code owner August 3, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-config Configuration file changes T-dependencies Dependencies related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

async-trait: make it an optional dependency

1 participant