Skip to content

[REDUNDANT] Rust officially supports async/await now

License

Notifications You must be signed in to change notification settings

stoand/rust-async

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Async

Compiler extension for Rust that will enable async code without callbacks.

travis build status

Syntax

#[async]
fn simple_return() -> i32 {
	1
}

#[async]
fn foo() {
    let bar = await!(simple_return());
    println!("{}", bar);
}

Generated Output

fn simple_return(_final_cb: &Fn(i32)) -> () {
    _final_cb(1);
}

fn foo() -> () {
    simple_return(&mut (|_cb1| {
        let bar = _cb1;
        bar.x;
    }));
}

About

[REDUNDANT] Rust officially supports async/await now

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages