Closed
Description
Futures currently have a dependency on TLS for storing a pointer to Context<'_>
.
https://github.com/rust-lang/rust/blob/master/src/libstd/future.rs#L116
This makes usage in no_std
environments quite difficult.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
benbrittain commentedon Jul 23, 2019
I would like to tackle this since it's blocking a personal project.
cc/ @cramertj @eddyb @nikomatsakis @Zoxc
[-]Remove TLS dependency from Futures [/-][+]Remove TLS dependency from async/await[/+]xurtis commentedon Jul 24, 2019
Duplicate of rustasync/team#42
xurtis commentedon Jul 24, 2019
There's also some additional background discussion on the rust-internals discourse.
cramertj commentedon Jul 24, 2019
Not sure if you were suggesting this, but I don't think we should be using other repo's issues to track changes to rustc.
xurtis commentedon Jul 24, 2019
I mean, nor do I but that is where most of the existing discussion is. It may be worth closing the other thread to try and avoid splitting the discussion over two issues on separate repos.
TomCrypto commentedon Jul 25, 2019
I'm running into this as well. You can work around it and get things working using a hack akin to this https://github.com/SunriseOS/core-futures-tls but it requires overriding libcore for every crate that needs
#![feature(async_await)]
which makes it difficult to do in library crates. TLS-freeasync fn
s would be cool.(I'm sure this workaround is well-known but just posting for future readers that might come across this issue)
phil-opp commentedon Sep 15, 2019
@cavedweller
Are you still working on this? I don't have much experience with the Rust compiler, but maybe there is still a way I can help?
6 remaining items