-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Update stdlib for the l4re target #92612
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @joshtriplett (or someone else) soon. Please see the contribution instructions for more information. |
Hi @joshtriplett, is there anything I can do to speed up the review process? |
[Benjamin Lamowski: Reworded commit message after split commit.]
[Benjamin Lamowski: Reworded commit message after split commit.]
As a capability-based microkernel OS, L4Re only has incomplete support for POSIX APIs, in particular it does not implement UIDs and GIDs.
L4Re provides limited POSIX support which includes support for standard I/O streams, and a limited implementation of the standard file handling API. However, because as a capability based OS it strives to only make a local view available to each application, there are currently no standardized special files like /dev/null that could serve to sanitize closed standard FDs. For now, skip any attempts to sanitize standard streams until a more complete POSIX runtime is available.
Copy the relevant trait implementations from the Unix default.
The initial stdlib modifications for L4Re just used the linux specifics directly because they were reasonably close to L4Re's behavior. However, this breaks when Linux-specific code relies on code that is only available for the linux target, such as in rust-lang#81825. Put L4Re into its own platform to avoid such breakage in the future. This uses the Linux-specific code as a starting point, which seems to be in line with other OSes with a unix-y interface such as Fuchsia.
Minimally comply with with rust-lang#87329 to avoid breaking tests on L4Re.
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.
Accepting without particular scrutiny after confirming that everything in this PR only affects cfg(target_os = "l4re")
, since:
- it's a tier 3 target,
- you appear to know what you are doing,
- at least one of the co-authors of the target from Add the libstd-modifications needed for the L4Re target #43972 has been pinged above.
We don't offer more review for niche targets than that. Sorry about the delay in getting to this!
@bors r |
📌 Commit bc199b5 has been approved by |
Update stdlib for the l4re target This PR contains the work by `@humenda` and myself to update standard library support for the x86_64-unknown-l4re-uclibc tier 3 target, split out from humenda/rust as requested in rust-lang#85967. The changes have been rebased on current master and updated in follow up commits by myself. The publishing of the changes is authorized and preferred by the original author. To preserve attribution, when standard library changes were introduced as part of other changes to the compiler, I have kept the changes concerning the standard library and altered the commit messages as indicated. Any incompatibilities have been remedied in follow up commits, so that the PR as a whole should result in a clean update of the target.
Rollup of 6 pull requests Successful merges: - rust-lang#92519 (Use verbatim paths for `process::Command` if necessary) - rust-lang#92612 (Update stdlib for the l4re target) - rust-lang#92663 (Implement `Write for Cursor<[u8; N]>`, plus `A: Allocator` cursor support) - rust-lang#93263 (Consistently present absent stdio handles on Windows as NULL handles.) - rust-lang#93692 (keyword_docs: document use of `in` with `pub` keyword) - rust-lang#94984 (add `CStr` method that accepts any slice containing a nul-terminated string) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This PR contains the work by @humenda and myself to update standard library support for the x86_64-unknown-l4re-uclibc tier 3 target, split out from humenda/rust as requested in #85967. The changes have been rebased on current master and updated in follow up commits by myself. The publishing of the changes is authorized and preferred by the original author. To preserve attribution, when standard library changes were introduced as part of other changes to the compiler, I have kept the changes concerning the standard library and altered the commit messages as indicated. Any incompatibilities have been remedied in follow up commits, so that the PR as a whole should result in a clean update of the target.