Stream: wg-async-foundations

Topic: futures crate


nikomatsakis (Sep 30 2019 at 17:18, on Zulip):

@Taylor Cramer for the upcoming blog post, you mentioned citing the futures crate. I'd be happy to do but I'm honestly not sure what to point at or recommend to folks. Is there a version of the futures crate that uses std::future?

nikomatsakis (Sep 30 2019 at 17:18, on Zulip):

I guess maybe feature async-await is the answer?

nikomatsakis (Sep 30 2019 at 17:19, on Zulip):

anyway if you want to supply a sentence + link be happy to add it :)

Taylor Cramer (Sep 30 2019 at 18:55, on Zulip):

Is there a version of the futures crate that uses std::future?

Yes, all of the futures-preview 0.3.0 releases have used std::future

Taylor Cramer (Sep 30 2019 at 18:55, on Zulip):

the current release (0.3.0-alpha.19) works on beta

Taylor Cramer (Sep 30 2019 at 18:56, on Zulip):

There will be a non-alpha 0.3.0 release to the futures (not futures-preview) crate alongside the stabilization of async/await

Lucio Franco (Sep 30 2019 at 19:05, on Zulip):

@Taylor Cramer Quick question: is there anywhere this is being tracked? What is gonna be stabilized by 1.39 stable? etc

Taylor Cramer (Sep 30 2019 at 19:06, on Zulip):

@Lucio Franco I'm not sure I understand the question. Are you asking about what language features are being stabilized?

Taylor Cramer (Sep 30 2019 at 19:07, on Zulip):

All of the current futures crate will be released as 0.3.0 alongside the release of 1.39.

Lucio Franco (Sep 30 2019 at 19:07, on Zulip):

@Taylor Cramer ok so pretty much what is in the crates as of 1.39 landing stable will be "stable" not including the unstable features etc?

Taylor Cramer (Sep 30 2019 at 19:08, on Zulip):

Which unstable features are you referring to? the "unstable" feature in the crate (for things like Initializer)?

Taylor Cramer (Sep 30 2019 at 19:09, on Zulip):

all the crates that are currently 0.3.0-alpha *-preview will be released as 0.3.0 without the -preview

Lucio Franco (Sep 30 2019 at 19:09, on Zulip):

Yeah, that could be it, I have not looked too deep. I guess this also means that the current Stream/Sink traits are gonna be stabilized, right? Just trying to think about how I should plan depending on the futures crates of the next few months.

Lucio Franco (Sep 30 2019 at 19:09, on Zulip):

Ok cool, by chance is there an issue for this in the futures-rs repo we can link too?

Taylor Cramer (Sep 30 2019 at 19:09, on Zulip):

The current Stream/Sink traits as they exist will be released in 0.3.0, yes.

Lucio Franco (Sep 30 2019 at 19:10, on Zulip):

Ok, that makes sense! Thanks!

Taylor Cramer (Sep 30 2019 at 19:12, on Zulip):

I've opened https://github.com/rust-lang-nursery/futures-rs/issues/1893

Lucio Franco (Sep 30 2019 at 19:18, on Zulip):

Awesome, thank you!

Taylor Cramer (Sep 30 2019 at 19:18, on Zulip):

Yeah of course! Thanks for checking in

nikomatsakis (Sep 30 2019 at 19:41, on Zulip):

Yes, all of the futures-preview 0.3.0 releases have used std::future

might be nice to clarify this on the website somewhere...

nikomatsakis (Sep 30 2019 at 19:41, on Zulip):

and/or a blog post

nikomatsakis (Sep 30 2019 at 19:41, on Zulip):

but ok!

Taylor Cramer (Sep 30 2019 at 19:45, on Zulip):

@nikomatsakis like https://rust-lang-nursery.github.io/futures-rs/blog/2018/07/19/futures-0.3.0-alpha.1.html ?

nikomatsakis (Sep 30 2019 at 19:45, on Zulip):

I guess. That was so old my eyes glazed over it.

nikomatsakis (Sep 30 2019 at 19:46, on Zulip):

I remember looking at it and being like "is this saying something about std::Future and async-await? I can't tell"

nikomatsakis (Sep 30 2019 at 19:46, on Zulip):

anyway, great, I'll link to that

Taylor Cramer (Sep 30 2019 at 19:46, on Zulip):

I mean, it's old because that's how long we've been developing against std::future XD

nikomatsakis (Sep 30 2019 at 19:46, on Zulip):

indeed

Taylor Cramer (Sep 30 2019 at 19:47, on Zulip):

but it's not a bad idea to have something more public making it clear what the plan is

nikomatsakis (Sep 30 2019 at 19:47, on Zulip):

this is more my point :)

Taylor Cramer (Sep 30 2019 at 19:47, on Zulip):

I could certainly write a blog post covering "what's up with the futures crate if you haven't been paying attention"

nikomatsakis (Sep 30 2019 at 19:47, on Zulip):

speaking as someone who hasn't, it's pretty hard to tell what's going on

nikomatsakis (Sep 30 2019 at 19:47, on Zulip):

actually, I lied, I never saw that post

nikomatsakis (Sep 30 2019 at 19:47, on Zulip):

I saw the one about the "compatibility layer"

Taylor Cramer (Sep 30 2019 at 19:48, on Zulip):

yeah, that was announcing that the std::future-based 0.3 had a shim to still be usable with other libraries using 0.1

nikomatsakis (Sep 30 2019 at 19:48, on Zulip):

anyway I think a new blog post isn't a bad idea, I've been wanting to bug you about it except that I feel like I don't yet know what I think about futures-rs and what its future ought to be

nikomatsakis (Sep 30 2019 at 19:48, on Zulip):

I think maybe even better would be to update the README a bit

nikomatsakis (Sep 30 2019 at 19:49, on Zulip):

anyway, perfect, thanks! pushing a new line to the blog post

nikomatsakis (Sep 30 2019 at 19:49, on Zulip):

anyway I think a new blog post isn't a bad idea, I've been wanting to bug you about it except that I feel like I don't yet know what I think about futures-rs and what its future ought to be

I know we've talked about this like 22 times :)

Taylor Cramer (Sep 30 2019 at 19:50, on Zulip):

Yeah I'm not quite sure what you want clarified there beyond what I've said before, but I'd be happy to chat.

nikomatsakis (Sep 30 2019 at 19:50, on Zulip):

Oh nothing I just think your view and others' views don't quite align

Taylor Cramer (Sep 30 2019 at 19:50, on Zulip):

I'd love to talk to those others about what they want to see

Taylor Cramer (Sep 30 2019 at 19:50, on Zulip):

at the moment I think I and the other maintainers have a very consistent view.

Taylor Cramer (Sep 30 2019 at 19:51, on Zulip):

If people want it to be something different, they should say so publicly.

nikomatsakis (Sep 30 2019 at 19:51, on Zulip):

(My view at the moment is that we should distinguish between "std-track" things, that we expect to move into the std library, and "utility" things, and we should probably spin them out into distinct crates and message it very clearly)

Taylor Cramer (Sep 30 2019 at 19:51, on Zulip):

and, like, to me in a productive way that we can act on.

Taylor Cramer (Sep 30 2019 at 19:51, on Zulip):

They are in different crates.

nikomatsakis (Sep 30 2019 at 19:51, on Zulip):

They are not "branded" in a clear way

nikomatsakis (Sep 30 2019 at 19:51, on Zulip):

(To me)

Taylor Cramer (Sep 30 2019 at 19:51, on Zulip):

???

nikomatsakis (Sep 30 2019 at 19:51, on Zulip):

let's talk about it later :)

Taylor Cramer (Sep 30 2019 at 19:51, on Zulip):

Okay. I'm not sure how to make it any clearer other than to just have fewer of them.

nikomatsakis (Sep 30 2019 at 19:52, on Zulip):

I'm not trying to start this discussion now, sorry that my comments earlier were semi-critical, I didn't really mean to be

Taylor Cramer (Sep 30 2019 at 19:52, on Zulip):

There have been many blog posts describing the situation, and the crates themselves describe what they're meant to be in the docs.

Taylor Cramer (Sep 30 2019 at 19:52, on Zulip):

I get that it's confusing-- it's a confusing design space. I'd love to make changes that you or others think would help clarify things.

nikomatsakis (Sep 30 2019 at 19:54, on Zulip):

How's this sound for the blog post?

- the 0.3.0 version of the [futures-rs library][futures] supports
async-await and will be released by the time async-await hits stable
(you can use the [0.3.0-alpha][] releases now);

Taylor Cramer (Sep 30 2019 at 19:56, on Zulip):

RE same repo-- okay, futures-core/futures-io/futures-sink can all go together, and then everything else in a separate repo. However, basically anyone using futures/streams is gonna want the extension traits and other utils (e.g. join, select, abortable, etc.) at some point, so then I'd advocate for pointing end users at the -util repo primarily.

Taylor Cramer (Sep 30 2019 at 19:56, on Zulip):

and that would be the one I think should have the futures name

Taylor Cramer (Sep 30 2019 at 19:57, on Zulip):

which should keep the facade like it has today.

nikomatsakis (Sep 30 2019 at 20:00, on Zulip):

yeah, I'm not sure if splitting them out is the high order bit (partly why I didn't post that msg, except by accident)

nikomatsakis (Sep 30 2019 at 20:00, on Zulip):

that said, I think that having a good idea of which traits/code we think should move to std and on what rough timescale would be good

nikomatsakis (Sep 30 2019 at 20:00, on Zulip):

and we could really "front and center" that on the documentation

nikomatsakis (Sep 30 2019 at 20:01, on Zulip):

maybe even just a FAQ sort of thing would help a lot

Taylor Cramer (Sep 30 2019 at 20:50, on Zulip):

@nikomatsakis where do you think that information should be surfaced? honestly I don't know that "is this ever gonna be in std" is a high-importance piece of information that the majority of futures-rs consumers need to be following.

Last update: Nov 18 2019 at 01:55UTC