Skip to content

Quest: Gradually migrate the Rust ecosystem to I/O safety #38

Closed
@sunfishcode

Description

@sunfishcode

As mentioned in the RFC, migration to I/O safety will be a gradual process. I'm laying out a roadmap here, with todo items, to help organize the process. If anyone is interested in helping with any of the items in this process, has ideas of things we should add, or has any questions about anything, please post in this issue! I'll add names to the todo items to track who's working on what.

The first steps are:

Once the feature reaches stable, the next step will be to contribute AsFd, From<OwnedFd> and From<T> for OwnedFd impls to popular types in the ecosystem. These changes are semver compatible, though they do have MSRV considerations.

To help crates that are already using io-lifetimes, such as rustix:

Once "enough" popular types have added the new impls, we can start migrating APIs to use the new traits, such as using AsFd in place of AsRawFd. When doing so, any functions that accept raw file-descriptor arguments should be changed to unsafe as well. These changes may require a semver bump. They may require a Minimum Supported Rust Version bump too, though another option is to use io-lifetimes once the change to have it re-export std's types and traits by default lands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions