How to use futures-await crate in 2018 preview

Hi, everyone.

I am unable to use futures-await crate, the problem is: I cannot import futures_await as futures:
extern crate futures_await as futures does not works and use futures_await as futures not works either, it fails with error:

can't find crate for `futures`
  --> lib-epoc-proc/src/
34 | use futures::prelude::*;
   |     ^^^^^^^ can't find crate

What I did wrong?

Which version of futures_await are you using in your Cargo.toml? When I try to pull in 0.2.0-alpha it fails but when I use 0.1 it all works fine.

Also, this kind of question usually gets quicker feedback on IRC, Gitter, or Discord.

The futures-await crate is basically dead; real async/await syntax is in nightly now.

1 Like

@steveklabnik, I expecting it a lot, but actix currently works only with futures 0.1 (AFAIK), and futures-await currently the only way put in order the callbacks I have (and make it refactorable in a future).

@ehiggs, I am using futures-await = "0.1.1"

I had a funny moment when I started trying to use the built-in async/await only to realize I can't actually "run" the futures. And so no library I know has switched to using std::futures::Future so most are still using futures::Future.

So correct me if I'm wrong but whlie futures-await may be dead from a development standpoint, it is still much alive as the working solution for async/await semantics right now.

I just wanted to leave this here for others in case they start trying to switch over

I believe there’s the compatibility layer to convert between the two versions, which would let this work?