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

Draft RFC to add Stream to the standard library #10

Merged
merged 4 commits into from
May 22, 2020

Conversation

nikomatsakis
Copy link
Contributor

No description provided.

rfc-drafts/stream.md Outdated Show resolved Hide resolved
rfc-drafts/stream.md Outdated Show resolved Hide resolved
@nikomatsakis
Copy link
Contributor Author

nikomatsakis commented May 14, 2020

Something else I was wondering: where in the standard library hierarchy should this trait live? I have to check what @sfackler did in the PR I guess.

More generally I feel like we have to decide whether to just sprinkle async things here and there with names like AsyncFoo or to take some other approach (e.g., std::async::..., although that's a keyword). I guess maybe it depends on how many additions we ultimately have.

@yoshuawuyts
Copy link
Member

I guess maybe it depends on how many additions we ultimately have.

async-std is effectively a big experiment to see how much of the stdlib would be useful (and possible) to port to async Rust. And so far the it seems virtually everything async-std provides is seeing use by people. What this means for the stdlib is that it would be reasonable to leave ourselves with enough space to grow, even if we're currently only considering a modest set of APIs for inclusion. Examples of "We may want to include a lot of this in the future" are: the io submodule (37 top-level exports) and sync submodule (18 top-level exports).


where in the standard library hierarchy should this trait live?

That's a really good question. @sfackler added it under core::stream, which makes sense as a counterpart to core::future. But when we consider AsyncRead and AsyncWrite for inclusion there may be different tradeoffs and the obvious std::io submodule may not be the best fit.

Copy link
Member

@yoshuawuyts yoshuawuyts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far this reads really well. Added a few notes of things that seem worth of mention. Very excited for this!

rfc-drafts/stream.md Show resolved Hide resolved
rfc-drafts/stream.md Outdated Show resolved Hide resolved
rfc-drafts/stream.md Outdated Show resolved Hide resolved
There is now an outline covering the major missing points.
@nikomatsakis
Copy link
Contributor Author

I'm going to merge this as a WIP -- we'll need to do follow-up work to flesh it out.

@nikomatsakis nikomatsakis merged commit a1bc4d8 into rust-lang:master May 22, 2020
@tmandry tmandry mentioned this pull request May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants