Skip to content
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

Feature request, move part of std::io into core::io to be used by rust-libc such as relibc #77781

Closed
wants to merge 1 commit into from

Conversation

lygstate
Copy link
Contributor

@lygstate lygstate commented Oct 10, 2020

Get std::io to be an core::io component so that can be used by runtime implemenation.

Especially for posix libc implemenation in rust with

  • syscall(Linux)
  • win32 api (windows)
  • syscall(osx)
  • syscall(redox)
  • ? (fedora)
    and so on.

This is for https://github.com/redox-os/relibc

Also for
https://github.com/rulibc/rulibc
The fork of relibc that act as an msvcrt/mingw/cygwin/msys2 alternative on win32

glibc/musl alternative on linux world.

redox support will alomost unchanged with the upstream Thttps://github.com/redox-os/relibc

And makes platform dependent IoSliceMut can be customized by the user
And give the default impl for windows/posix.

#36193
related

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @withoutboats (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 10, 2020
@lygstate lygstate changed the title RFC Feature request, move part of std::io into core::io to be used by rus… Feature request, move part of std::io into core::io to be used by rust-libc such as relibc Oct 10, 2020
lygstate added a commit to rulibc/rulibc that referenced this pull request Oct 11, 2020
lygstate added a commit to rulibc/rulibc that referenced this pull request Oct 11, 2020
Enable possible tests in core_io, other use upstream version directly

core io update
lygstate added a commit to rulibc/rulibc that referenced this pull request Oct 11, 2020
Enable possible tests in core_io, other use upstream version directly

core io update
…t-libc such as relibc

Get libstd io to be portable.

And makes platform dependent IoSliceMut can be customized by the user
And give the default impl for windows/posix.
lygstate added a commit to rulibc/rulibc that referenced this pull request Oct 11, 2020
Enable possible tests in core_io, other use upstream version directly

core io update
lygstate added a commit to rulibc/rulibc that referenced this pull request Oct 11, 2020
Enable possible tests in core_io, other use upstream version directly

core io update
lygstate added a commit to rulibc/rulibc that referenced this pull request Oct 12, 2020
@clarfonthey
Copy link
Contributor

This has been brought up before a lot of times and I'm for moving a decent chunk of std::io (at least traits) into core::io, but I think that we'd want an RFC to hash out the details.

@lygstate
Copy link
Contributor Author

This has been brought up before a lot of times and I'm for moving a decent chunk of std::io (at least traits) into core::io, but I think that we'd want an RFC to hash out the details.

Thanks, I actually didn't move std::io to core::io yet, Just post a list of files that affect when I used them to implement posix c runtime.

@mati865
Copy link
Contributor

mati865 commented Oct 13, 2020

There was an RFC: rust-lang/rfcs#2262
Main blocker: rust-lang-nursery/portability-wg#12

@bors
Copy link
Contributor

bors commented Oct 16, 2020

☔ The latest upstream changes (presumably #78001) made this pull request unmergeable. Please resolve the merge conflicts.

Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

@lygstate
Copy link
Contributor Author

use #77922 instead

@lygstate lygstate closed this Oct 16, 2020
@lygstate lygstate deleted the stdio.core branch February 16, 2021 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants