Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raw stdio handles #972

Open
alexcrichton opened this issue Mar 13, 2015 · 0 comments
Open

Raw stdio handles #972

alexcrichton opened this issue Mar 13, 2015 · 0 comments
Labels
T-libs-api Relevant to the library API team, which will review and decide on the RFC.

Comments

@alexcrichton
Copy link
Member

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.

@petrochenkov petrochenkov added T-libs-api Relevant to the library API team, which will review and decide on the RFC. and removed A-libs labels Jan 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-libs-api Relevant to the library API team, which will review and decide on the RFC.
Projects
None yet
Development

No branches or pull requests

2 participants