-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
add support of RustyHermit's BSD socket layer #107405
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
||
[[package]] | ||
name = "hermit-abi" | ||
version = "0.3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will now have all three versions of hermit-abi required at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, you are right. I will write PRs to upgrade num_cpus
etc.
The last commit is more a suggestion from my side. I am not sure, where I should store the AsFd and similar traits. I trie to harmonize my implementation to other implementations. |
ce31f74
to
68cef7c
Compare
This comment has been minimized.
This comment has been minimized.
Please mark with |
Ok, I will do it. However |
@Mark-Simulacrum If I understand it correctly, |
@rustbot ready |
@bjorn3 is there a reason I'm missing we shouldn't just land this PR, and then follow-up with dropping hermit-abi dependencies once the ecosystem syncs back up? |
That would work. The changes in files not specific to hermit look correct to me. For the hermit specific files I didn't notice anything obviously wrong, but also didn't review it as closely. Given that RustyHermit is a tier 3 target and the PR author is a maintainer of RustyHermit, I think this is fine. @bors r+ |
📌 Commit dd270f1f440831cd4b491185b2fa2c35b6bfd503 has been approved by It is now in the queue for this repository. |
⌛ Testing commit dd270f1f440831cd4b491185b2fa2c35b6bfd503 with merge 3103afcd69f7155552cd4c91f644f1c2c4a8628c... |
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
library/std/src/os/fd/raw.rs
Outdated
#[cfg(target_os = "hermit")] | ||
use hermit_abi::{STDERR_FILENO, STDIN_FILENO, STDOUT_FILENO}; | ||
#[cfg(not(target_os = "hermit"))] | ||
use libc::{STDERR_FILENO, STDIN_FILENO, STDOUT_FILENO}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI issue happens when documenting std on Windows. std::os::fd
exists even on Windows with cfg(doc)
. We might work around like this:
#[cfg(target_os = "hermit")] | |
use hermit_abi::{STDERR_FILENO, STDIN_FILENO, STDOUT_FILENO}; | |
#[cfg(not(target_os = "hermit"))] | |
use libc::{STDERR_FILENO, STDIN_FILENO, STDOUT_FILENO}; | |
#[cfg(target_os = "hermit")] | |
use hermit_abi as libc; |
This, together with changing the FILENO
s back to libc::*_FILENO
, should solve the windows docs issue.
These commits modify the If this was intentional then you can ignore this comment. |
RustHermit publishs a new kernel interface and supports a common BSD socket layer. By supporting this interface, the implementation can be harmonized to other operating systems. To realize this socket layer, the handling of file descriptors is also harmonized to other operating systems.
By moving the IO traits, the RustyHermit support is harmonized to of other operating systems.
@bjorn3 I think that @mkroening's comment is correct. The documentation was broken. |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (34e6673): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. |
dependencies: reduce the amount of crates pulling in atty It would be nice to have only one `hermit-abi` in `Cargo.lock` (rust-lang#107405 (comment)). The only crate pulling in the old `hermit-abi` version is `atty`, which is unmaintained. This PR upgrades three dependencies, which then no longer depend on `atty`: * `Cargo.lock`: `colored v2.0.0 -> v2.0.4` * `Cargo.lock`: `tracing-tree v0.2.3 -> v0.2.4` * Miri: `env_logger 0.9.3 -> 0.10.0` The only dependency chain left that pulls in `hermit-abi 0.1.19` is: `hermit-abi 0.1.19` -> `atty 0.2.14` -> `env_logger 0.7.1` -> `jsonpath_lib 0.2.6` -> `jsondocck 0.1.0` (src/tools/jsondocck) Replacing jsondocck with jsondocckng is tracked in rust-lang#94140.
dependencies: reduce the amount of crates pulling in atty It would be nice to have only one `hermit-abi` in `Cargo.lock` (rust-lang/rust#107405 (comment)). The only crate pulling in the old `hermit-abi` version is `atty`, which is unmaintained. This PR upgrades three dependencies, which then no longer depend on `atty`: * `Cargo.lock`: `colored v2.0.0 -> v2.0.4` * `Cargo.lock`: `tracing-tree v0.2.3 -> v0.2.4` * Miri: `env_logger 0.9.3 -> 0.10.0` The only dependency chain left that pulls in `hermit-abi 0.1.19` is: `hermit-abi 0.1.19` -> `atty 0.2.14` -> `env_logger 0.7.1` -> `jsonpath_lib 0.2.6` -> `jsondocck 0.1.0` (src/tools/jsondocck) Replacing jsondocck with jsondocckng is tracked in rust-lang/rust#94140.
RustyHermit is a tier 3 platform and publishes a new kernel interface. The new version supports a common BSD socket layer. By supporting this interface, the implementation of
std
can be harmonized to other operating systems. Insys_common/mod.rs
we remove only a special case for RustyHermit. All changes are done in the RustyHermit specific directories.To realize this socket layer, the handling of file descriptors is also harmonized to other operating systems.