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

At least portions of std::sys should be public #18897

Closed
emberian opened this issue Nov 12, 2014 · 3 comments · Fixed by #19169
Closed

At least portions of std::sys should be public #18897

emberian opened this issue Nov 12, 2014 · 3 comments · Fixed by #19169
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.

Comments

@emberian
Copy link
Member

Right now it is impossible to use MemoryMap with a file because AsFileDesc is in sys_common and thus private.

We should figure out which portions of sys should be public.

@emberian emberian added A-io regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. labels Nov 12, 2014
@huonw huonw added the A-libs label Nov 12, 2014
@emberian
Copy link
Member Author

cc @aturon @xales

@Arcterus
Copy link
Contributor

We need AsFileDesc to fix the uutils build as well (without resorting to hacks).

@aturon
Copy link
Member

aturon commented Nov 12, 2014

Yes, exposing file descriptors is very much part of the plan, though they will likely not be exposed directly via sys. More on this very soon.

bors added a commit that referenced this issue Nov 26, 2014
This PR adds some internal infrastructure to allow the private `std::sys` module to access internal representation details of `std::io`.

It then exposes those details in two new, platform-specific API surfaces: `std::os::unix` and `std::os::windows`.

To start with, these will provide the ability to extract file descriptors, HANDLEs, SOCKETs, and so on from `std::io` types.

More functionality, and more specific platforms (e.g. `std::os::linux`) will be added over time.

Closes #18897
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.
Projects
None yet
4 participants