You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.
async/await landed on stable Rust in version 1.39 on 07.11.2019!
This epic tracks all issues that are related with moving our codebase to async/await.
Current setup
You can use async/await within the cnd and btsieve crates (those have the necessary compatibility layers setup that are required to have new and old Futures work together)
Some code parts are already making heavy use of async/await (f.e. btsieve internals)
What do we need to migrate everything (without a compatibility layer)?
tokio needs to update to std-futures (alternatively we could switch to async-std)
Benefits
Converting the codebase to async/await is expected to bring the following benefits:
Less code
Writing asynchronous code with async/await instead of using combinators on Future needs significantly less LoC to express the same functionality.
Better ergonomics
Usage of combinators often requires cloning of references. This boilerplate is going away with async/await.
Better organization of code
With async/await, code reuse goes back to declaring a function (an async one). On the other hand, code reuse through manual creation of Futures requires the definition of structs.
More concretely, moving to async/await should allow for an easier way of reusing code because it is just functions (again).
The text was updated successfully, but these errors were encountered:
async/await landed on stable Rust in version 1.39 on 07.11.2019!
This epic tracks all issues that are related with moving our codebase to async/await.
Current setup
cnd
andbtsieve
crates (those have the necessary compatibility layers setup that are required to have new and oldFuture
s work together)What do we need to migrate everything (without a compatibility layer)?
async-std
)Benefits
Converting the codebase to async/await is expected to bring the following benefits:
Less code
Writing asynchronous code with async/await instead of using combinators on
Future
needs significantly less LoC to express the same functionality.Better ergonomics
Usage of combinators often requires cloning of references. This boilerplate is going away with async/await.
Better organization of code
With async/await, code reuse goes back to declaring a function (an async one). On the other hand, code reuse through manual creation of
Future
s requires the definition of structs.More concretely, moving to async/await should allow for an easier way of reusing code because it is just functions (again).
The text was updated successfully, but these errors were encountered: