From 47090b15fb8898faa1c08042bfac192d44d4e50b Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 12 Jun 2024 20:18:33 +0200 Subject: [PATCH] export std::os::fd module on HermitOS The HermitOS' IO interface is similiar to Unix. Consequently, this PR synchronize the FD implementation between both. --- std/src/os/hermit/io/mod.rs | 15 +++------------ std/src/os/mod.rs | 2 +- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/std/src/os/hermit/io/mod.rs b/std/src/os/hermit/io/mod.rs index 524dfae0d63ae..df93f63a003cf 100644 --- a/std/src/os/hermit/io/mod.rs +++ b/std/src/os/hermit/io/mod.rs @@ -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::*; diff --git a/std/src/os/mod.rs b/std/src/os/mod.rs index ca3584e82f918..d2a7b316b8131 100644 --- a/std/src/os/mod.rs +++ b/std/src/os/mod.rs @@ -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))]