Posts by deeply involved developers about various aspects of FOSS technologies, Linux, programming, security, infrastructure solutions and DevOps practices
Breakthrough and crucial leap forward for Rust and Tokio
This November was really exciting for the Rust community!
async/.awat (new syntax for asyncronous code execution with zero-cost futures under the hood, which is in turn, correspondingly, based on epoll model of passive calls to handler functions by arisen events, i.e. based on more cost effective, truly zero-cost, lazy evaluation model of computations and state changes) and NLL (non-lexical lifetimes, new borrow & ownership checker, based on control flow and data flow lifetimes analysis in more low-level intermediate MIR byte code, not the syntax tree analysis as it was before) reached the stable state/branch and released in stable 1.39 compiler version!
So, thus, in the next couple of months we will see how will increased the user base of Rust, the networking projects diversity in ecosystem and how the community will grow up in the near future due to this essential features, finally delivered into stable branch in these last two months.
Here is the really good articles, which describes how the futures, the "handler pyramid of doom" and it's asynchronous destructors are works and optimized under the hood of async/.await:
Why it's so important? Just take a look at the new work-stealing thread scheduler (M:N thread mapper, which uses work-stealing model for more optimal CPU cores load and maps program asynchronous threads to system threads pool, dedicated to execute the program, which is in turn managed by the kernel and mapped to CPU cores, accordingly) in Tokio - that's a huge step forward! Initial testing using Hyper (raw http library) shows a 30%+ speed up!
We expect some movements up in the tournament table of the TechEmpower continuous frameworks benchmarks, so watch the results here: https://tfb-status.techempower.com