Elektrine lite

← Feed

@andybalaam@mastodon.social

2026-04-14 11:31 UTC

Tips for avoiding "async bloat" from Dion https://tweedegolf.nl/en/blog/235/debloat-your-async-rust * Avoid async fns that don't actually need to be async * Use -> impl Future for async 'pass-through' functions (and return Future::ready()) * Use the futures crate to allow more async fns to be rewritten as a 'pass-through' function * When possible, refactor code to share await points * Pass references to large variables instead of moving them in #rustlang #async

Replies (1)