#async #futures

nightly futures_future

The Rust crate that converts the old style futures crate futures::Future into the new nightly async/await style std::future::Future so you can easily try out the new syntax

1 unstable release

0.1.0 Sep 11, 2018

#93 in #futures

Download history 17/week @ 2018-09-16 2/week @ 2018-09-23 9/week @ 2018-09-30 6/week @ 2018-10-07 5/week @ 2018-10-14 5/week @ 2018-10-21 4/week @ 2018-10-28

4 downloads per month

MIT license

3KB

WARNING: DOES NOT ACTUALLY WORK I THINK

This requires some kind of task system, which I can't figure out. It might sporadically work, but not consistently because there's no implementation for waking up tasks.

Futures Future

The Rust crate that converts the old style futures crate futures::Future into the new nightly async/await style std::future::Future so you can easily try out the new syntax.

Example

#![feature(async_await)]
#![feature(futures_api)]
#![feature(await_macro)]

use futures::*;
use futures::sync::oneshot;
use futures_future::*;

pub async fn and_its_done() {
    let (signal_setup_done, mut setup_done) = oneshot::channel::<bool>();
    let _ = signal_setup_done.send(true);
    let f = futures_future(&mut setup_done);
    await!(f);
}

Dependencies

~464KB