Skip to content

Commit ece937d

Browse files
committed
chore: set the minimum rust-version and remove rust-toolchain
1 parent 1377a5b commit ece937d

File tree

9 files changed

+34
-36
lines changed

9 files changed

+34
-36
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,11 @@ jobs:
6666
if: matrix.os == 'ubuntu-latest' # Run typos only on Linux
6767

6868
- name: Audit Dependencies
69-
if: matrix.os == 'ubuntu-latest'
70-
run: |
71-
cargo install cargo-audit --version 0.20.0 --locked --force
72-
cargo audit --deny warnings
73-
env:
74-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75-
# - name: Audit Dependencies
76-
# uses: actions-rust-lang/audit@v1
77-
# with:
78-
# token: ${{ secrets.GITHUB_TOKEN }}
79-
# if: matrix.os == 'ubuntu-latest' # Run audit only on Linux
69+
uses: actions-rust-lang/audit@v1
70+
with:
71+
token: ${{ secrets.GITHUB_TOKEN }}
72+
if: matrix.os == 'ubuntu-latest' # Run audit only on Linux
73+
8074
# install nodejs that is required for tests
8175
- name: Setup Node.js
8276
uses: actions/setup-node@v4

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ members = [
1818

1919
]
2020

21+
[workspace.package]
22+
rust-version = "1.80.0"
23+
2124
[workspace.dependencies]
2225
# Workspace member crates
2326
rust-mcp-transport = { version = "0.6.2", path = "crates/rust-mcp-transport", default-features = false }

crates/rust-mcp-extra/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ documentation = "https://docs.rs/rust-mcp-extra"
99
keywords = ["serverless", "mcp-server", "rust-mcp", "cloud", "lambda"]
1010
license = "MIT"
1111
edition = "2024"
12+
rust-version = { workspace = true }
1213
exclude = ["assets/", "tests/"]
1314

1415
[dependencies]

crates/rust-mcp-macros/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ documentation = "https://docs.rs/rust-mcp-macros"
99
keywords = ["rust-mcp-stack", "model", "context", "protocol", "macros"]
1010
license = "MIT"
1111
edition = "2021"
12+
rust-version = { workspace = true }
1213
exclude = ["assets/"]
1314

1415
[package.metadata.docs]

crates/rust-mcp-sdk/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ documentation = "https://docs.rs/rust-mcp-sdk"
99
keywords = ["rust-mcp-stack", "model", "context", "protocol", "sdk"]
1010
license = "MIT"
1111
edition = "2021"
12+
rust-version = { workspace = true }
1213
exclude = ["assets/", "tests/"]
1314

1415
[dependencies]

crates/rust-mcp-sdk/src/mcp_http/mcp_http_middleware.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ impl MiddlewareChain {
128128
}
129129
}
130130

131+
#[allow(dead_code)]
131132
// Sample Middleware
132133
pub struct LoggingMiddleware;
133134

crates/rust-mcp-transport/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ documentation = "https://docs.rs/rust-mcp-transport"
99
keywords = ["rust-mcp-stack", "model", "context", "protocol", "sdk"]
1010
license = "MIT"
1111
edition = "2021"
12+
rust-version = { workspace = true }
1213
exclude = ["assets/"]
1314

1415
[dependencies]

examples/hello-world-mcp-server-stdio/src/tools.rs

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
1+
use rust_mcp_sdk::macros::JsonSchema;
12
use rust_mcp_sdk::schema::{schema_utils::CallToolError, CallToolResult, TextContent};
23
use rust_mcp_sdk::{macros::mcp_tool, tool_box};
4+
// use rust_mcp_sdk::schema::RpcError;
5+
// use std::str::FromStr;
36

4-
use rust_mcp_sdk::macros::JsonSchema;
5-
use rust_mcp_sdk::schema::RpcError;
6-
use std::str::FromStr;
7-
8-
// Simple enum with FromStr trait implemented
9-
#[derive(JsonSchema, Debug)]
10-
pub enum Colors {
11-
#[json_schema(title = "Green Color")]
12-
Green,
13-
#[json_schema(title = "Red Color")]
14-
Red,
15-
}
16-
impl FromStr for Colors {
17-
type Err = RpcError;
7+
// // Simple enum with FromStr trait implemented
8+
// #[derive(JsonSchema, Debug)]
9+
// pub enum Colors {
10+
// #[json_schema(title = "Green Color")]
11+
// Green,
12+
// #[json_schema(title = "Red Color")]
13+
// Red,
14+
// }
15+
// impl FromStr for Colors {
16+
// type Err = RpcError;
1817

19-
fn from_str(s: &str) -> Result<Self, Self::Err> {
20-
match s.to_lowercase().as_str() {
21-
"green" => Ok(Colors::Green),
22-
"red" => Ok(Colors::Red),
23-
_ => Err(RpcError::parse_error().with_message("Invalid color".to_string())),
24-
}
25-
}
26-
}
18+
// fn from_str(s: &str) -> Result<Self, Self::Err> {
19+
// match s.to_lowercase().as_str() {
20+
// "green" => Ok(Colors::Green),
21+
// "red" => Ok(Colors::Red),
22+
// _ => Err(RpcError::parse_error().with_message("Invalid color".to_string())),
23+
// }
24+
// }
25+
// }
2726

2827
//****************//
2928
// SayHelloTool //

rust-toolchain.toml

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)