rust-lang / rust-lang/rfcs

Raw stdio handles

Open
#972 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

T-libs
Dominant language
Markdown
Stars
6.6k
Forks
1.7k
Avg merge
16h 14m
Merged PRs (30d)
1

Description

An amendment to RFC 517 added stdio support to the standard library. This manifested itself only in the abstractions the standard library, provides, however, and the underlying OS story is quite nuanced and is not bound at this time.

Specifically, the standard library should provide stdio handles for all platforms which have no buffering and no locking done implicitly. On Unix this is as simple as exposing the file descriptors through a wrapper struct, but the story is much more complicated on Windows. Windows stdio is either attached as a console or not, and when attached as a console it deals with [u16] and when not it deals with [u8]. This means that Windows probably needs to have at least two types to represent this distinction, and the console one will not implement Read and Write due to the encoding difference.

A sketch API is provided in the amendment, but it is not finalized and should probably be discussed further as well.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read text/0517-io-os-reform.md and the raw-stdio section of amendment PR 899 first. Clarify the unresolved Unix and Windows handle behavior and API shape, then use the agreed design as the basis for implementation and platform coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.