Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

public API naming and shape decisions drift without a referenced style guide

オープン 初心者向け
#1,155 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
86/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
rust
領域
documentation

調査の方向性

CONTRIBUTING.md を開き、既存のコードスタイルとリポジトリのパターンのみを参照していることを確認します。既存の API を変更せずに、公開 API の命名と型の形状の基準として、公式の Rust API Guidelines への参照を追加します。完了条件は、コントリビューター向けドキュメントからガイドと関連するチェックリストに明示的にリンクされており、API の整合は引き続きスコープ外であることです。

索引モデルが issue の本文から書いたものです。

説明

P3 question T-documentation T-enhancement

Description

While looking through the crate's public API, I noticed a few inconsistencies that suggest there's no referenced style-guide baseline behind naming/type-shape decisions:

  • Some plain accessors use a get_ prefix while neighboring accessors in the same files don't, which reads as inconsistent with the Rust API Guidelines' C-GETTER convention.
  • Identifier fields (session/task/tool-use/client id) are represented as bare String/Arc<str> rather than distinct types, so nothing stops one id kind being passed where another is expected.

No repo doc references a style guide, so it's unclear whether this is intentional or just drift. Simplest fix: state explicitly in contributor docs that code should be idiomatic and follow the official Rust API Guidelines (https://rust-lang.github.io/api-guidelines/) - its naming (C-*) and type-safety (C-NEWTYPE) checklists already cover both examples above, so this is a documentation change, not a new process to design. Bringing existing API (like the two examples above) in line with the referenced guide is a separate, breaking-change follow-up - worth tracking on its own once the guide itself is adopted, not part of this issue.

Reproduction Steps

  1. rg -n "pub fn get_[a-z_]+\(" crates/rmcp/src - 8 matches, all plain field/derived-value accessors inconsistent with sibling accessors in the same files.
  2. Compare SessionId/EventId/StreamId/task_id/tool_use_id/client_id field types across model.rs, task_manager.rs, transport/auth.rs - all bare String/Arc<str>/type aliases, no newtype.
  3. Checked CONTRIBUTING.md and the repo for any reference to language-specific style guide - none found. CONTRIBUTING.md only says "follow existing code style" / "follow the repository's established patterns," with no concrete convention to check against.

Expected Behavior

Contributor docs cite an explicit style-guide baseline for public API naming/shape.

Actual Behavior

No such reference exists, so it's unclear whether naming inconsistencies like the above are intentional.

Logs / Evidence

主要言語
Rust
スター
3.9k
フォーク
645
平均マージ
4日 22時間
マージ済み PR(30日)
37

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

modelcontextprotocol/rust-sdk のほかの issue

modelcontextprotocol/rust-sdk の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。