Skip to content

Commit 3d588e6

Browse files
committed
initial commit
0 parents  commit 3d588e6

36 files changed

+16917
-0
lines changed

.cargo/config.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[alias]
2+
run_clippy = [
3+
"clippy",
4+
"--features",
5+
"latest draft",
6+
"--fix",
7+
"--",
8+
"-D",
9+
"warnings",
10+
]
11+
12+
run_test = ["nextest", "run"]
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
title: "Feature Request: "
2+
labels: ["feature-request"]
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
Thank you for suggesting a new feature! Please provide the necessary details below to help us evaluate your request.
8+
- type: textarea
9+
id: motivation
10+
attributes:
11+
label: Motivation
12+
description: "What problem are you trying to solve, and why is this feature important?"
13+
validations:
14+
required: true
15+
- type: textarea
16+
id: proposal
17+
attributes:
18+
label: Proposed Solution
19+
description: "Describe the feature you’re requesting and how it should work."
20+
validations:
21+
required: true
22+
- type: textarea
23+
id: alternatives
24+
attributes:
25+
label: Alternative Solutions
26+
description: "Are there any other approaches or workarounds you’ve considered?"
27+
- type: textarea
28+
id: additional
29+
attributes:
30+
label: Additional Context
31+
description: |
32+
Provide any other relevant details, such as platform-specific considerations, related discussions, or supporting information.

.github/FUNDING.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# FUNDING.yml
2+
3+
#GitHub Sponsors
4+
github: ["hashemix"]
5+
# OpenCollective
6+
# open_collective: "opencollective-project"
7+
8+
# Patreon
9+
# patreon: "patreon-username"
10+
11+
# Buy Me a Coffee
12+
# buy_me_a_coffee: "bmac-username"
13+
14+
# Ko-fi
15+
# ko_fi: "kofi-username"
16+
17+
# Custom donation links
18+
# custom: ["https://custom-donation-link.com"]

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Bug Report
2+
description: Report an issue with rust-mcp-schema.
3+
title: "Bug: "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thank you for reporting a bug! Please provide the details below to help us investigate and resolve the issue.
10+
11+
Before submitting, ensure you're using [the latest version]() of the rust-mcp-schema.
12+
- type: textarea
13+
id: description
14+
attributes:
15+
label: Issue Description
16+
description: |
17+
Provide a clear description of the issue, including detailed steps to reproduce it.
18+
value: |
19+
**Issue Summary:**
20+
21+
**Steps to Reproduce:**
22+
1.
23+
2.
24+
3.
25+
validations:
26+
required: true
27+
- type: textarea
28+
id: expected
29+
attributes:
30+
label: Expected Behavior
31+
description: What was the expected outcome?
32+
validations:
33+
required: true
34+
- type: textarea
35+
id: actual
36+
attributes:
37+
label: Actual Behavior
38+
description: What actually happened? Include logs, error messages, or relevant output (consider using a [GitHub Gist](https://gist.github.com) if needed).
39+
validations:
40+
required: true
41+
- type: textarea
42+
id: version
43+
attributes:
44+
label: Version
45+
description: Specify which version of rust-mcp-schema you're using (e.g., latest, draft, or a specific version number).
46+
render: text
47+
validations:
48+
required: false
49+
- type: textarea
50+
id: version
51+
attributes:
52+
label: MCP Schema Version
53+
description: Specify which version of mcp schema specification you're using (e.g., latest, draft, 2024_11_05).
54+
render: text
55+
validations:
56+
required: false
57+
- type: textarea
58+
id: additional
59+
attributes:
60+
label: Additional Information
61+
description: |
62+
Provide any extra details that might be relevant, such as environment specifics, system configuration, or related discussions.
63+
validations:
64+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Feature request
4+
url: https://github.com/new?category=feature-requests
5+
about: File a feature request in the Discussions section.
6+
- name: Q&A
7+
url: https://github.com/discussions/new?category=q-a
8+
about: Ask a question in the Discussions section.

.github/settings.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# These settings are synced to GitHub by https://probot.github.io/apps/settings/
2+
3+
repository:
4+
name: rust-mcp-schema
5+
description: "A type-safe implementation of the Model Context Protocol (MCP) schema in Rust."
6+
homepage: "docs.rs/rust-mcp-schema"
7+
topics: "Model Context Protocol for Rust"
8+
has_issues: true
9+
has_projects: false
10+
has_wiki: false
11+
has_downloads: true
12+
default_branch: main
13+
14+
# Clean commits are preferred
15+
allow_merge_commit: true
16+
# In case we need to clean up commits
17+
allow_squash_merge: true
18+
# not allowed
19+
allow_rebase_merge: false
20+
21+
allow_auto_merge: true
22+
delete_branch_on_merge: true
23+
24+
squash_merge_commit_title: "PR_TITLE"
25+
squash_merge_commit_message: "PR_BODY"
26+
merge_commit_message: "PR_BODY"
27+
28+
# labels:
29+
# # 🌱 Feature & Enhancement Labels
30+
# - name: "feature"
31+
# color: "1D76DB" # Blue
32+
# description: "New feature request or enhancement"
33+
34+
# - name: "enhancement"
35+
# color: "84b6eb" # Light Blue
36+
# description: "Improvement or refinement of an existing feature"
37+
38+
# # 🐛 Bug Labels
39+
# - name: "bug"
40+
# color: "D73A4A" # Red
41+
# description: "Something isn't working correctly"
42+
43+
# - name: "critical-bug"
44+
# color: "B60205" # Dark Red
45+
# description: "A high-priority bug that needs urgent attention"
46+
47+
# # 🔧 Maintenance & Refactoring
48+
# - name: "refactor"
49+
# color: "C5DEF5" # Light Blue
50+
# description: "Code cleanup or restructuring"
51+
52+
# - name: "dependencies"
53+
# color: "0366D6" # Dark Blue
54+
# description: "Dependency updates and maintenance"
55+
56+
# # 🛠️ Support & Help Labels
57+
# - name: "question"
58+
# color: "D876E3" # Purple
59+
# description: "General questions and discussions"
60+
61+
# - name: "help wanted"
62+
# color: "008672" # Green
63+
# description: "Extra attention is needed, contributors welcome"
64+
65+
# - name: "good first issue"
66+
# color: "7057FF" # Light Purple
67+
# description: "Good for first-time contributors"
68+
69+
# # 🔄 Status Labels
70+
# - name: "wontfix"
71+
# color: "ffffff" # White
72+
# description: "This issue will not be fixed"
73+
74+
# - name: "duplicate"
75+
# color: "CCCCCC" # Gray
76+
# description: "Duplicate of another issue"
77+
78+
# - name: "invalid"
79+
# color: "E4E669" # Yellow
80+
# description: "Not a valid issue or PR"
81+
82+
# # 🚀 Workflow & Priority
83+
# - name: "in progress"
84+
# color: "FBCA04" # Orange
85+
# description: "Work is currently ongoing"
86+
87+
# - name: "blocked"
88+
# color: "000000" # Black
89+
# description: "Blocked by another issue or dependency"
90+
91+
# # 📦 Release & Versioning
92+
# - name: "breaking change"
93+
# color: "FF0000" # Bright Red
94+
# description: "A change that requires adjustments by users"

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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: taiki-e/install-action@nextest
32+
33+
- name: Run Clippy
34+
run: |
35+
scripts/run_clippy.sh
36+
37+
- name: Run Rustfmt
38+
run: |
39+
cargo fmt --all -- --check
40+
41+
- name: Run cargo doc
42+
run: cargo doc --no-deps
43+
44+
- name: Spell Check
45+
env:
46+
RUSTDOCFLAGS: "-Dwarnings"
47+
uses: crate-ci/typos@master
48+
49+
- name: Audit
50+
uses: actions-rust-lang/audit@v1
51+
with:
52+
token: ${{ secrets.GITHUB_TOKEN }}
53+
54+
- name: Run Tests
55+
run: |
56+
scripts/run_test.sh

.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_target:
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/publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish to Crates.io
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout Repository
13+
uses: actions/checkout@v4
14+
15+
- name: Install Rust Toolchain
16+
uses: dtolnay/rust-toolchain@stable
17+
18+
- name: Publish to Crates.io
19+
env:
20+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
21+
run: cargo publish --token $CARGO_REGISTRY_TOKEN

.github/workflows/release-pr.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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: google-github-actions/release-please-action@v3
27+
with:
28+
release-type: rust
29+
pull-request-header: ":robot: Automated release created! :rocket:"
30+
token: ${{ secrets.RP_SECRET }}

.gitignore

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

0 commit comments

Comments
 (0)