Read borrowed byte ranges without copying through ByteReader
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
std/bytes/cursor.wave と std/bytes/types.wave から始め、既存の ByteReader 操作と対象を絞った O0/O2 テストを確認します。バイト数に対する checked borrowed read/take の動作を追加し、zero-count、EOF、invalid-state、invalid-output の場合に状態と出力が保持されるようにします。成功条件は、割り当てなしでソース範囲が正確に返され、バイトが変更されず、成功時にのみ reader が一度だけ進むことです。
索引モデルが issue の本文から書いたものです。
説明
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
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
wavefnd/Wave のほかの issue
-
enhancement good first issue needs testing
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue needs testing
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue needs testing
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue needs testing
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue needs testing
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
area:casework bug criticality:p3 triage:needs-implementation
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
registrystack/registry-stack#1623 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DioxusLabs/anyrender#98 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
leptos-rs/leptos#4885 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
longbridge/gpui-kit#3276 ·
メンテナーはふだん 1 日以内に返信