Skip to content

Commit 7f16718

Browse files
committed
initial commit
0 parents  commit 7f16718

File tree

87 files changed

+7192
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+7192
-0
lines changed

.github/workflows/ci.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_call:
7+
8+
# on:
9+
# push:
10+
# branches:
11+
# - main
12+
# pull_request:
13+
# branches:
14+
# - "**"
15+
#
16+
17+
jobs:
18+
rust_check:
19+
name: Rust check
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Install Rust Toolchain
26+
uses: dtolnay/rust-toolchain@master
27+
with:
28+
toolchain: stable
29+
components: rustfmt
30+
31+
- uses: davidB/rust-cargo-make@v1
32+
- uses: taiki-e/install-action@nextest
33+
34+
- name: Run Clippy
35+
run: |
36+
cargo make clippy
37+
38+
- name: Run Rustfmt
39+
run: |
40+
cargo make fmt
41+
42+
- name: Run cargo doc
43+
run: cargo doc --no-deps
44+
45+
- name: Spell Check
46+
env:
47+
RUSTDOCFLAGS: "-Dwarnings"
48+
uses: crate-ci/typos@master
49+
50+
- name: Audit
51+
uses: actions-rust-lang/audit@v1
52+
with:
53+
token: ${{ secrets.GITHUB_TOKEN }}
54+
55+
- name: Run Tests
56+
run: |
57+
cargo make test
58+
- name: Run Doc Tests
59+
run: |
60+
cargo make doc-test

.github/workflows/lint-pr.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Lint PR
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
- reopened
10+
11+
permissions:
12+
pull-requests: read
13+
14+
jobs:
15+
pr-check:
16+
name: Validate PR title
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
- name: Lint PR
22+
uses: amannn/action-semantic-pull-request@v5
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
wip: false # needs write access if enabled
27+
requireScope: false
28+
subjectPattern: ^(?![A-Z]).+$
29+
subjectPatternError: |
30+
The subject "{subject}" found in the pull request title "{title}"
31+
didn't match the configured pattern. Please ensure that the subject
32+
starts with a lowercase character.
33+
34+
ci:
35+
name: CI
36+
needs: pr-check
37+
uses: ./.github/workflows/ci.yml

.github/workflows/release-pr.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: ReleasePR
2+
3+
permissions:
4+
pull-requests: write
5+
contents: write
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
# if: github.event.head_commit.committer.name != 'GitHub'
16+
# needs: ci
17+
permissions:
18+
contents: write
19+
pull-requests: write
20+
21+
steps:
22+
- name: Checkout Repository
23+
uses: actions/checkout@v4
24+
25+
- name: Release Please
26+
uses: googleapis/release-please-action@v4
27+
env:
28+
ACTIONS_STEP_DEBUG: true
29+
with:
30+
token: ${{ secrets.RP_SECRET }}
31+
config-file: .release-config.json
32+
manifest-file: .release-manifest.json

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/target
2+
.DS_store
3+
settings.json
4+
5+
6+
# test artifacts
7+
/coverage
8+
*.lcov
9+
# *.profraw
10+
target/**

.release-config.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"release-type": "rust",
4+
"release-as": "",
5+
"include-component-in-tag": true,
6+
"plugins": [
7+
"cargo-workspace",
8+
"sentence-case"
9+
],
10+
"pull-request-header": ":robot: Auto-generated release PR",
11+
"packages": {
12+
"crates/rust-mcp-macros": {
13+
"release-type": "rust",
14+
"draft": false,
15+
"prerelease": false,
16+
"bump-minor-pre-major": true,
17+
"bump-patch-for-minor-pre-major": true,
18+
"changelogPath": "CHANGELOG.md",
19+
"extra-files": [
20+
{
21+
"type": "generic",
22+
"path": "CHANGELOG.md"
23+
}
24+
]
25+
},
26+
"crates/rust-mcp-transport": {
27+
"release-type": "rust",
28+
"draft": false,
29+
"prerelease": false,
30+
"bump-minor-pre-major": true,
31+
"bump-patch-for-minor-pre-major": true,
32+
"changelogPath": "CHANGELOG.md",
33+
"extra-files": [
34+
{
35+
"type": "generic",
36+
"path": "CHANGELOG.md"
37+
}
38+
]
39+
},
40+
"crates/rust-mcp-sdk": {
41+
"release-type": "rust",
42+
"draft": false,
43+
"prerelease": false,
44+
"bump-minor-pre-major": true,
45+
"bump-patch-for-minor-pre-major": true,
46+
"changelogPath": "CHANGELOG.md",
47+
"extra-files": [
48+
{
49+
"type": "generic",
50+
"path": "CHANGELOG.md"
51+
}
52+
]
53+
}
54+
}
55+
}

.release-manifest.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"crates/rust-mcp-sdk": "0.1.0",
3+
"crates/rust-mcp-macros": "0.1.0",
4+
"crates/rust-mcp-transport": "0.1.0",
5+
"examples/hello-world-mcp-server": "0.1.0",
6+
"examples/hello-world-mcp-server-core": "0.1.0",
7+
"examples/simple-mcp-client": "0.1.0",
8+
"examples/simple-mcp-client-core": "0.1.0"
9+
}

0 commit comments

Comments
 (0)