Andrew Burkhart
andrewburkhart.bsky.social
Andrew Burkhart
@andrewburkhart.bsky.social
Senior Rust Developer, 1Password
Published my first Rust crate today. Introducing priact.

crates.io/crates/priact

priact implements the actor pattern (based on the Swift implementation) in Rust and adds a priority queue for your actors methods to respect the urgency you need for them.
June 18, 2025 at 6:34 PM
If you convert the above code to this code, the app will panic. When we hit the expect() line, nothing from the async fn start_invocation_loop() has run yet.
November 6, 2024 at 6:56 PM
Rust Tip: async fn is entirely lazy.

I posted this code the other day showing how you can do some sync setup before an asynchronous block to initialize things needed by the future.

Many times, any fn() -> impl Future can be replaced by an async fn. Not true here.

Explanation in 🧵
November 6, 2024 at 6:54 PM
Actually this should've been like this. Oops
November 6, 2024 at 6:52 PM
Rust Tip: Rust futures are lazy but you can perform synchronous setup before they're polled.

For example, the code in this image might seem like it should panic at first glance because expect() is called before start_invocation_loop() initializes the OnceCell but it doesn't.

Explanation in 🧵
November 2, 2024 at 7:48 PM