Skip to content

feat: introduce Cargo features to isolate client and server code #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 20, 2025

Conversation

hashemix
Copy link
Member

@hashemix hashemix commented Apr 20, 2025

📌 Summary

This PR introduces Cargo feature flags to modularize the client and server components of the crate.
The goal is to improve code separation, reduce unnecessary compilation, and allow for more targeted builds (e.g., only client, only server, or both).

🔍 Related Issues

✨ Changes Made

  • Introduced two new features client and server.
  • Documented the new client and server feature flags in the README
  • Updated examples to explicitly set the features needed
  • Removed unnecessary dependencies from examples

💡 Additional Notes

Using Only the server Feature (you may also want to include the macros feature)

[dependencies]
rust-mcp-sdk = { version = "0.2.0", default-features = false, features = ["server"] }

Using Only the client Feature

[dependencies]
rust-mcp-sdk = { version = "0.2.0", default-features = false, features = ["client"] }

@hashemix hashemix merged commit 1fa9a6f into main Apr 20, 2025
2 checks passed
@hashemix hashemix mentioned this pull request Apr 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

separate out client vs server
1 participant