Skip to content

Conversation

@ningmingxiao
Copy link
Contributor

@ningmingxiao ningmingxiao commented Oct 11, 2024

@mxpv mxpv added this pull request to the merge queue Oct 21, 2024
Merged via the queue into containerd:main with commit a6b4286 Oct 21, 2024
18 checks passed
@ningmingxiao ningmingxiao deleted the pipe branch October 24, 2024 14:07
@Mossaka
Copy link
Member

Mossaka commented Nov 5, 2024

It looks like this PR broke the runc crate when async feature is not enabled.`

@ningmingxiao, @mxpv

Repro

$ cargo build -p runc               
   Compiling runc v0.2.0 (/home/mossaka/developer/spinkube/rust-extensions-fork/crates/runc)
error[E0433]: failed to resolve: use of undeclared crate or module `tokio`
  --> crates/runc/src/io.rs:34:5
   |
34 | use tokio::net::unix::pipe;
   |     ^^^^^ use of undeclared crate or module `tokio`

error[E0277]: the trait bound `OwnedFd: std::io::Write` is not satisfied
   --> crates/runc/src/io.rs:165:26
    |
165 |                 .map(|x| Box::new(x) as Box<dyn Write + Send + Sync>)
    |                          ^^^^^^^^^^^ the trait `std::io::Write` is not implemented for `OwnedFd`
    |
    = note: required for the cast from `std::boxed::Box<OwnedFd>` to `std::boxed::Box<dyn std::io::Write + Send + Sync>`

error[E0277]: the trait bound `OwnedFd: std::io::Read` is not satisfied
   --> crates/runc/src/io.rs:185:26
    |
185 |                 .map(|x| Box::new(x) as Box<dyn Read + Send>)
    |                          ^^^^^^^^^^^ the trait `std::io::Read` is not implemented for `OwnedFd`
    |
    = note: required for the cast from `std::boxed::Box<OwnedFd>` to `std::boxed::Box<dyn std::io::Read + Send>`

error[E0277]: the trait bound `OwnedFd: std::io::Read` is not satisfied
   --> crates/runc/src/io.rs:205:26
    |
205 |                 .map(|x| Box::new(x) as Box<dyn Read + Send>)
    |                          ^^^^^^^^^^^ the trait `std::io::Read` is not implemented for `OwnedFd`
    |
    = note: required for the cast from `std::boxed::Box<OwnedFd>` to `std::boxed::Box<dyn std::io::Read + Send>`

@mxpv
Copy link
Member

mxpv commented Nov 5, 2024

hmm, that's bad. Do you want to open a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-runc runc helper

Projects

None yet

Development

Successfully merging this pull request may close these issues.

does os_pipe support for tokio::io::copy?

3 participants