Skip to content

Commit

Permalink
Rollup merge of rust-lang#126346 - hermit-os:fd, r=Amanieu
Browse files Browse the repository at this point in the history
export std::os::fd module on HermitOS

The HermitOS' IO interface is similiar to Unix. Consequently, this PR synchronize the FD implementation between both.

closes rust-lang#126198
  • Loading branch information
jieyouxu authored Jun 17, 2024
2 parents ebbce69 + 47090b1 commit 2730879
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
15 changes: 3 additions & 12 deletions std/src/os/hermit/io/mod.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
#![stable(feature = "os_fd", since = "1.66.0")]
#![stable(feature = "rust1", since = "1.0.0")]

mod net;
#[path = "../../fd/owned.rs"]
mod owned;
#[path = "../../fd/raw.rs"]
mod raw;

// Export the types and traits for the public API.
#[stable(feature = "os_fd", since = "1.66.0")]
pub use owned::*;
#[stable(feature = "os_fd", since = "1.66.0")]
pub use raw::*;
#[stable(feature = "rust1", since = "1.0.0")]
pub use crate::os::fd::*;
2 changes: 1 addition & 1 deletion std/src/os/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ pub(crate) mod watchos;
#[cfg(target_os = "xous")]
pub mod xous;

#[cfg(any(unix, target_os = "wasi", doc))]
#[cfg(any(unix, target_os = "hermit", target_os = "wasi", doc))]
pub mod fd;

#[cfg(any(target_os = "linux", target_os = "android", doc))]
Expand Down

0 comments on commit 2730879

Please sign in to comment.