Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
A new version of entrait has been released, this time with experimental support for zero-cost async Inversion of Control.
This means that asynchronous applications may be loosely coupled and unit tested, but without allocating any Boxed futures. In entrait, trait definitions are generated by a macro, so the technicalities are automatically taken care of under the hood. Note that this feature relies on feature(generic_associated_types) and feature(type_alias_impl_trait), and therefore requires a nightly compiler. I believe that the technique used is the same technique that will one day support static async fn in traits.
A goal when designing Entrait (and unimock) was to create a completely zero-cost design pattern and testing library for Rust applications, even usable in no_std runtimes. Though I don't do any embedded development myself, I believe that Entrait is now a lot closer to that goal.
I'm working on a PoC to rewrite the realworld app from launchbadge to use entrait: https://github.com/audunhalland/rust-realworld-ioc/ (work in progress), maybe it can be used as inspiration.
I'm working on a PoC to rewrite the realworld app from launchbadge to use entrait: https://github.com/audunhalland/rust-realworld-ioc/ (work in progress), maybe it can be used as inspiration.