Skip to content

Commit ff9e3af

Browse files
authored
feat: re-export transport and macros for seamless user experience (#4)
* update doc * feat: improve lib exports
1 parent 1ea09cf commit ff9e3af

File tree

9 files changed

+18
-7
lines changed

9 files changed

+18
-7
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ members = [
1313

1414
[workspace.dependencies]
1515
# Workspace member crates
16-
rust-mcp-transport = { version = "0.1.0", path = "crates/rust-mcp-transport" }
17-
rust-mcp-sdk = { version = "0.1.0", path = "crates/rust-mcp-sdk" }
18-
rust-mcp-macros = { version = "0.1.0", path = "crates/rust-mcp-macros" }
16+
rust-mcp-transport = { path = "crates/rust-mcp-transport" }
17+
rust-mcp-sdk = { path = "crates/rust-mcp-sdk" }
18+
rust-mcp-macros = { path = "crates/rust-mcp-macros" }
1919

2020
# External crates
2121
rust-mcp-schema = { version = "0.2.1" }

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ async fn main() -> SdkResult<()> {
183183

184184
Here is the output :
185185

186-
![rust-mcp-sdk-client-output](https://github.com/rust-mcp-stack/rust-mcp-sdk/tree/main/assets/sample/mcp-client-sample-code.jpg)
186+
![rust-mcp-sdk-client-output](assets/examples/mcp-client-sample-code.jpg)
187187

188188
> your results may vary slightly depending on the version of the MCP Server in use when you run it.
189189

crates/rust-mcp-macros/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@ description = "A procedural macro, part of the rust-mcp-sdk ecosystem, that deri
1515

1616
[dependencies]
1717
serde_json = { workspace = true }
18+
serde = { version = "1.0", features = ["derive"] }
1819
syn = "2.0"
1920
quote = "1.0"
2021
proc-macro2 = "1.0"
2122

2223
[dev-dependencies]
2324
rust-mcp-schema = { version = "0.2.1" }
24-
serde = { version = "1.0", features = ["derive"] }
25-
serde_json = { version = "1.0" }
2625

2726
[lints]
2827
workspace = true

crates/rust-mcp-sdk/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ edition = "2021"
1313
[dependencies]
1414
rust-mcp-schema = { workspace = true }
1515
rust-mcp-transport = { workspace = true }
16+
rust-mcp-macros = { workspace = true, optional = true }
1617

1718
tokio.workspace = true
1819
serde = { workspace = true }
@@ -21,6 +22,9 @@ async-trait = { workspace = true }
2122
futures = { workspace = true }
2223
thiserror = { workspace = true }
2324

25+
[features]
26+
default = ["macros"] # Default features
27+
macros = ["rust-mcp-macros"]
2428

2529
[lints]
2630
workspace = true

crates/rust-mcp-sdk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ async fn main() -> SdkResult<()> {
183183

184184
Here is the output :
185185

186-
![rust-mcp-sdk-client-output](https://github.com/rust-mcp-stack/rust-mcp-sdk/tree/main/assets/sample/mcp-client-sample-code.jpg)
186+
![rust-mcp-sdk-client-output](assets/examples/mcp-client-sample-code.jpg)
187187

188188
> your results may vary slightly depending on the version of the MCP Server in use when you run it.
189189
Loading

crates/rust-mcp-sdk/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,10 @@ pub mod mcp_server {
6868

6969
pub use mcp_traits::mcp_client::*;
7070
pub use mcp_traits::mcp_server::*;
71+
72+
pub use rust_mcp_transport::*;
73+
74+
#[cfg(feature = "macros")]
75+
pub mod macros {
76+
pub use rust_mcp_macros::*;
77+
}

0 commit comments

Comments
 (0)