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

Tracking Issue for anonymous pipe API #127154

Open
3 of 4 tasks
NobodyXu opened this issue Jun 30, 2024 · 10 comments
Open
3 of 4 tasks

Tracking Issue for anonymous pipe API #127154

NobodyXu opened this issue Jun 30, 2024 · 10 comments
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. F-anonymous_pipe `#![feature(anonymous_pipe)]` I-libs-api-nominated Nominated for discussion during a libs-api team meeting. proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@NobodyXu
Copy link
Contributor

NobodyXu commented Jun 30, 2024

This is a tracking issue for the ACP rust-lang/libs-team#375 .
The feature gate for the issue is #![feature(anonymous_pipe)].

// std::pipe

fn pipe() -> io::Result<(PipeReader, PipeWriter)>;

struct PipeReader {...}
struct PipeWriter {...}

impl PipeReader {
    fn try_clone(&self) -> io::Result<Self>;
}

impl PipeWriter {
    fn try_clone(&self) -> io::Result<Self>;
}

impl Read for &PipeReader
impl Read for PipeReader
impl Debug for PipeReader
impl From<PipeReader> for Stdio

impl Write for &PipeWriter
impl Write for PipeWriter
impl Debug for PipeWriter
impl From<PipeWriter> for Stdio

// unix {
impl AsFd for PipeReader
impl AsRawFd for PipeReader
impl FromRawFd for PipeReader
impl IntoRawFd for PipeReader
impl From<PipeReader> for OwnedFd
impl From<OwnedFd> for PipeReader

impl AsFd for PipeWriter
impl AsRawFd for PipeWriter
impl FromRawFd for PipeWriter
impl IntoRawFd for PipeWriter
impl From<PipeWriter> for OwnedFd
impl From<OwnedFd> for PipeWriter
// }

// windows {
impl AsHandle for PipeReader
impl AsRawHandle for PipeReader
impl FromRawHandle for PipeReader
impl IntoRawHandle for PipeReader
impl From<PipeReader> for OwnedHandle
impl From<OwnedHandle> for PipeReader

impl AsHandle for PipeWriter
impl AsRawHandle for PipeWriter
impl FromRawHandle for PipeWriter
impl IntoRawHandle for PipeWriter
impl From<PipeWriter> for OwnedHandle
impl From<OwnedHandle> for PipeWriter
// }

Steps

Implementation history

@NobodyXu NobodyXu added the C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC label Jun 30, 2024
@Fulgen301
Copy link
Contributor

You might want to fix the typo in the title and feature name - it's an anonymous pipe, not an annoymous pipe.

@NobodyXu NobodyXu changed the title Tracking Issue for annoymous_pipe API Tracking Issue for anonymous pipe API Jun 30, 2024
@NobodyXu
Copy link
Contributor Author

Thanks!

I've fixed the typo in this issue and the linked PR.

jhpratt added a commit to jhpratt/rust that referenced this issue Jul 11, 2024
Initial implementation of anonymous_pipe API

ACP completed in rust-lang/libs-team#375
Tracking issue: rust-lang#127154
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jul 12, 2024
Initial implementation of anonymous_pipe API

ACP completed in rust-lang/libs-team#375
Tracking issue: rust-lang#127154
jhpratt added a commit to jhpratt/rust that referenced this issue Jul 13, 2024
Initial implementation of anonymous_pipe API

ACP completed in rust-lang/libs-team#375
Tracking issue: rust-lang#127154
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 14, 2024
Initial implementation of anonymous_pipe API

ACP completed in rust-lang/libs-team#375
Tracking issue: rust-lang#127154
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 15, 2024
Initial implementation of anonymous_pipe API

ACP completed in rust-lang/libs-team#375
Tracking issue: rust-lang#127154
tgross35 added a commit to tgross35/rust that referenced this issue Jul 16, 2024
Initial implementation of anonymous_pipe API

ACP completed in rust-lang/libs-team#375
Tracking issue: rust-lang#127154
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 18, 2024
Initial implementation of anonymous_pipe API

ACP completed in rust-lang/libs-team#375
Tracking issue: rust-lang#127154
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 18, 2024
Initial implementation of anonymous_pipe API

ACP completed in rust-lang/libs-team#375
Tracking issue: rust-lang#127154

try-job: x86_64-msvc
try-job: i686-mingw
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 20, 2024
Initial implementation of anonymous_pipe API

ACP completed in rust-lang/libs-team#375
Tracking issue: rust-lang#127154

try-job: x86_64-msvc
try-job: i686-mingw
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 20, 2024
Initial implementation of anonymous_pipe API

ACP completed in rust-lang/libs-team#375
Tracking issue: rust-lang#127154

try-job: x86_64-msvc
try-job: i686-mingw
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 21, 2024
Initial implementation of anonymous_pipe API

ACP completed in rust-lang/libs-team#375
Tracking issue: rust-lang#127154

try-job: x86_64-msvc
try-job: i686-mingw
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 22, 2024
Initial implementation of anonymous_pipe API

ACP completed in rust-lang/libs-team#375
Tracking issue: rust-lang#127154

try-job: x86_64-msvc
try-job: i686-mingw
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 23, 2024
Initial implementation of anonymous_pipe API

ACP completed in rust-lang/libs-team#375
Tracking issue: rust-lang#127154

try-job: x86_64-msvc
try-job: i686-mingw
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 24, 2024
Initial implementation of anonymous_pipe API

ACP completed in rust-lang/libs-team#375
Tracking issue: rust-lang#127154

try-job: x86_64-msvc
try-job: i686-mingw
@NobodyXu
Copy link
Contributor Author

NobodyXu commented Jul 28, 2024

I think we can now add specialisation to std::io::copy for std::pipe

jieyouxu added a commit to jieyouxu/rust that referenced this issue Aug 3, 2024
…viper

Enable `std::io::copy` specialisation for `std::pipe::{PipeReader, PipeWriter}`

Enable `std::io::copy` specialisation on unix for the newly added anonymous pipe API, tracking issue rust-lang#127154
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Aug 3, 2024
…viper

Enable `std::io::copy` specialisation for `std::pipe::{PipeReader, PipeWriter}`

Enable `std::io::copy` specialisation on unix for the newly added anonymous pipe API, tracking issue rust-lang#127154
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Aug 3, 2024
Rollup merge of rust-lang#128303 - NobodyXu:specialise-for-pipe, r=cuviper

Enable `std::io::copy` specialisation for `std::pipe::{PipeReader, PipeWriter}`

Enable `std::io::copy` specialisation on unix for the newly added anonymous pipe API, tracking issue rust-lang#127154
@NobodyXu
Copy link
Contributor Author

I'm thinking about a new method for checked conversion from OwnedFd on unix.

I think it would be quite helpful for jobserver-rs

@RalfJung
Copy link
Member

Currently the documentation for this module is very bare-bones, quite far from the depth and quality we are used to in other parts of the standard library. There's not even a single example. This should be resolved before stabilization.

@jieyouxu jieyouxu added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 9, 2024
@jieyouxu jieyouxu added the F-anonymous_pipe `#![feature(anonymous_pipe)]` label Dec 9, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 14, 2024
…documentation, r=tgross35

Add documentation for anonymous pipe module

Tracking issue: rust-lang#127154

`@NobodyXu` I've been using this feature lately and thought I might contribute with some documentation. I borrowed liberally from [os_pipe](https://docs.rs/os_pipe/latest/os_pipe/) so thanks to `@oconnor663.`
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Dec 15, 2024
Rollup merge of rust-lang#133986 - olishmollie:tracking-issue-127154-documentation, r=tgross35

Add documentation for anonymous pipe module

Tracking issue: rust-lang#127154

`@NobodyXu` I've been using this feature lately and thought I might contribute with some documentation. I borrowed liberally from [os_pipe](https://docs.rs/os_pipe/latest/os_pipe/) so thanks to `@oconnor663.`
@NobodyXu
Copy link
Contributor Author

@olishmollie has added e examples and improve documentation in #133986, does it mean it can be stabilised @RalfJung

@RalfJung RalfJung added the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Dec 15, 2024
@RalfJung
Copy link
Member

That's up for the team to decide. I have nominated this for team discussion to get them to take a look at this.

@joshtriplett joshtriplett removed the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Dec 16, 2024
@joshtriplett
Copy link
Member

I'm going to go ahead and start a stabilization FCP to collect consensus asynchronously, though we'll still talk about it in a meeting as well:

@rfcbot merge

@rfcbot
Copy link

rfcbot commented Dec 16, 2024

Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Dec 16, 2024
@dtolnay
Copy link
Member

dtolnay commented Dec 21, 2024

I have added an API outline to the top of this issue. It is different from the one in the ACP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. F-anonymous_pipe `#![feature(anonymous_pipe)]` I-libs-api-nominated Nominated for discussion during a libs-api team meeting. proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants