Skip to content

Commit a02cd76

Browse files
committed
chore: declare and check MSRV
1 parent 50dd8e2 commit a02cd76

7 files changed

Lines changed: 27 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,28 @@ jobs:
205205
- name: Spell Check Repo
206206
uses: crate-ci/typos@master
207207

208+
msrv:
209+
name: Check MSRV
210+
runs-on: ubuntu-latest
211+
steps:
212+
- uses: actions/checkout@v7
213+
214+
- name: Read MSRV from Cargo.toml
215+
run: |
216+
MSRV=$(cargo metadata --no-deps --format-version 1 \
217+
| jq -r '.packages[] | select(.name == "rmcp") | .rust_version')
218+
echo "MSRV=$MSRV" >> "$GITHUB_ENV"
219+
220+
- name: Install MSRV Rust
221+
uses: dtolnay/rust-toolchain@master
222+
with:
223+
toolchain: ${{ env.MSRV }}
224+
225+
- uses: Swatinem/rust-cache@v2
226+
227+
- name: Check default workspace members with MSRV
228+
run: cargo +${{ env.MSRV }} check --all-targets --all-features
229+
208230
test:
209231
name: Run Tests
210232
runs-on: ubuntu-latest

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ rmcp-macros = { version = "2.2.0", path = "./crates/rmcp-macros" }
99

1010
[workspace.package]
1111
edition = "2024"
12+
rust-version = "1.88"
1213
version = "2.2.0"
1314
authors = ["4t145 <u4t145@163.com>"]
1415
license = "Apache-2.0"

clippy.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
msrv = "1.85"
21
too-many-arguments-threshold = 10
32
check-private-items = false

crates/rmcp-macros/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ name = "rmcp-macros"
55
license = { workspace = true }
66
version = { workspace = true }
77
edition = { workspace = true }
8+
rust-version = { workspace = true }
89
repository = { workspace = true }
910
homepage = { workspace = true }
1011
readme = { workspace = true }

crates/rmcp/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "rmcp"
33
license = { workspace = true }
44
version = { workspace = true }
55
edition = { workspace = true }
6+
rust-version = { workspace = true }
67
repository = { workspace = true }
78
homepage = { workspace = true }
89
readme = { workspace = true }

examples/transport/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "transport"
33
edition = { workspace = true }
4+
rust-version = { workspace = true }
45
version = { workspace = true }
56
authors = { workspace = true }
67
license = { workspace = true }

examples/wasi/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "wasi-mcp-example"
33
edition = { workspace = true }
4+
rust-version = { workspace = true }
45
version = { workspace = true }
56
authors = { workspace = true }
67
license = { workspace = true }

0 commit comments

Comments
 (0)