You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add runnable examples for path-based and descriptor-based file I/O #377
documentationIssues or enhancements related to the documentation.good first issueIssues that are good for newcomers or first-time contributors.needs testingIssues that require additional testing or verification.
Current file APIs are easy to misuse. fs_read_all accepts a path, destination pointer, and capacity, while io_read accepts a file descriptor. Existing examples do not make that boundary obvious.
Scope
Add small runnable examples and Wave corpus fixtures for:
Opening and closing a file with std::fs::file.
Reading a path into a caller-owned byte array with fs_read_all.
Reading an already-open descriptor with std::io::fd::io_read.
Handling negative return values.
Reporting the number of bytes read without treating it as a string length.
Use only current APIs. API renaming belongs to #375 and its design follow-ups.
Completion criteria
Every example compiles with the current compiler and installed std layout.
At least one fixture executes on supported hosted Linux CI.
Buffer capacity and returned byte count are checked.
Examples do not import private transitive symbols.
Documentation states that fs_read_all does not allocate or return str.
I'd like to work on this issue. I'll first look through the existing file I/O examples and add the requested runnable examples and fixtures while keeping the current APIs unchanged.
I'd like to work on this issue. I'll first look through the existing file I/O examples and add the requested runnable examples and fixtures while keeping the current APIs unchanged.
documentationIssues or enhancements related to the documentation.good first issueIssues that are good for newcomers or first-time contributors.needs testingIssues that require additional testing or verification.
Activity
Saket7002 commentedon Aug 27, 2026
I'd like to work on this issue. I'll first look through the existing file I/O examples and add the requested runnable examples and fixtures while keeping the current APIs unchanged.
LunaStev commentedon Aug 27, 2026
Thanks! I've assigned this issue to you.