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.