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

Read borrowed byte ranges without copying through ByteReader

クローズ 初心者向け
#761 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
compilers

調査の方向性

std/bytes/cursor.wave と std/bytes/types.wave から始め、既存の ByteReader 操作と対象を絞った O0/O2 テストを確認します。バイト数に対する checked borrowed read/take の動作を追加し、zero-count、EOF、invalid-state、invalid-output の場合に状態と出力が保持されるようにします。成功条件は、割り当てなしでソース範囲が正確に返され、バイトが変更されず、成功時にのみ reader が一度だけ進むことです。

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

説明

enhancement good first issue needs testing

Motivation

ByteReader can copy a fixed byte range into caller storage, but it cannot consume a payload as a borrowed view of the original buffer. Length-prefixed parsers must duplicate cursor validation to avoid a copy.

Starting points: std/bytes/cursor.wave, std/bytes/types.wave.

Scope

Add a checked read/take operation returning Bytes over count bytes, advancing only after success. Retain borrowed lifetime/ownership and avoid allocation. This complements subviews but specifically owns reader state transitions.

Difficulty: easy.

Completion criteria

  • Return the exact original byte range and advance once on success.
  • Define zero-count behavior consistently with existing readers.
  • Preserve position/output on EOF, invalid state and invalid output.
  • Do not modify source bytes; run focused O0/O2 tests.
主要言語
Rust
スター
56
フォーク
21
平均マージ
2時間 37分
マージ済み PR(30日)
57

環境構築

はじめの一歩

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

wavefnd/Wave のほかの issue

wavefnd/Wave の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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