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

Refactor the standard library into a crate of crates #11828

Closed
brson opened this issue Jan 27, 2014 · 4 comments
Closed

Refactor the standard library into a crate of crates #11828

brson opened this issue Jan 27, 2014 · 4 comments

Comments

@brson
Copy link
Contributor

brson commented Jan 27, 2014

It is very desirable for std to be maximally portable to a variety of enviroments, and I am slightly worried that if we don't focus on making it well-factored now, before 1.0, that portability will be hampered later.

Sub-dividing std into crates to isolate platform-dependent parts will establish clear dependencies within the library. We can preserve std's interface by reexporting.

I can imagine at least the following subdivision:

  • libc
  • win - the parts of std::libc that are actually the windows api
  • prim - the primitive types
  • path
  • os
  • comm
  • task
  • rt
  • std
@brson
Copy link
Contributor Author

brson commented Jan 27, 2014

This will probably require some clever thought about how to deal with failure and other task-local services in the lowest-level crates, since these are plattform-specific concepts.

@alexcrichton
Copy link
Member

liblibc

This sounds like a fantastic to me. A "compilation profile" would sound to me like a subset of crates instead of littering #[cfg(foo)] everywhere (perhaps)

@brson
Copy link
Contributor Author

brson commented Jan 31, 2014

I have a patch that factors a few primitive things out of std.

@alexcrichton
Copy link
Member

Closing in favor of #13851

bors added a commit to rust-lang-ci/rust that referenced this issue Jul 25, 2022
…jonas-schievink

fix visibility token validation in trait impl with proc-macro

fix rust-lang#11828
bors added a commit to rust-lang-ci/rust that referenced this issue Dec 1, 2023
Fix typo

Fix a little spelling error.

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants