Deadlock-free asynchronous message reordering in rust with multiparty session types
Zak Cutner, Nobuko Yoshida, Martin Vassor
Abstract
Rust is a modern systems language focused on performance and reliability. Complementing Rust's promise to provide "fearless concurrency", developers frequently exploit asynchronous message passing. Unfortunately, sending and receiving messages in an arbitrary order to maximise computationcommunication overlap (a popular optimisation in messagepassing applications) opens up a Pandora's box of subtle concurrency bugs.
To guarantee deadlock-freedom by construction, we present Rumpsteak: a new Rust framework based on multiparty session types. Previous session type implementations in Rust are either built upon synchronous and blocking communication and/or are limited to two-party interactions. Crucially, none support the arbitrary ordering of messages for efficiency.
Rumpsteak instead targets asynchronous async/await code. Its unique ability is allowing developers to arbitrarily order send/receive messages while preserving deadlockfreedom. For this, Rumpsteak incorporates two recent advanced session type theories: (1) 𝑘-multiparty compatibility (𝑘-MC), which globally verifies the safety of a set of participants, and (2) asynchronous multiparty session subtyping, which locally verifies optimisations in the context of a single participant. Specifically, we propose a novel algorithm for asynchronous subtyping that is both sound and decidable.
We first evaluate the performance and expressiveness of Rumpsteak against three previous Rust implementations. We discover that Rumpsteak is around 1.7-8.6x more efficient and can safely express many more examples by virtue of offering arbitrary ordering of messages. Secondly, we analyse the complexity of our new algorithm and benchmark it against 𝑘-MC and a binary session subtyping algorithm. We find they are exponentially slower than Rumpsteak's.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 0235a8c1-e97f-4723-8ddf-9d6f699b7448Cited by top-tier papers4
- Top-Down or Bottom-Up? Complexity Analyses of Synchronous Multiparty Session TypesThien Udomsrirungruang, Nobuko YoshidaPOPL 2025 · 7 citations
- Characterizing Implementability of Global Protocols with Infinite States and DataElaine Li, Felix Stutz, Thomas Wies, Damien ZuffereyOOPSLA 2025 · 2 citations
- Top-Down = Bottom-Up: Sound and Complete Characterisations of Liveness by Multiparty Global ProtocolsKai Pischke, Nobuko YoshidaOOPSLA 2026
- Implementability of Global Distributed Protocols Modulo Network ArchitecturesElaine Li, Thomas WiesPLDI 2026
Builds on4
- Understanding memory and thread safety practices and issues in real-world Rust programsBoqin Qin, Yilun Chen, Zeming Yu, Linhai Song et al.PLDI 2020 · 112 citations
- Statically verified refinements for multiparty protocolsFangyi Zhou, Francisco Ferreira, Raymond Hu, Rumyana Neykova et al.OOPSLA 2020 · 38 citations
- Precise subtyping for asynchronous multiparty sessionsSilvia Ghilezan, Jovanka Pantovic, Ivan Prokic, Alceste Scalas et al.POPL 2021 · 26 citations
- CAMP: cost-aware multiparty session protocolsDavid Castro-Perez, Nobuko YoshidaOOPSLA 2020 · 16 citations
Related papers
- Separation and Encodability in Mixed Choice Multiparty SessionsKirstin Peters, Nobuko YoshidaLICS 2024 · 10 citations
- Hybrid Multiparty Session Types: Compositionality for Protocol Specification through Endpoint ProjectionLorenzo Gheri, Nobuko YoshidaOOPSLA 2023 · 5 citations
- Mixtris: Mechanised Higher-Order Separation Logic for Mixed Choice Multiparty Message PassingJonas Kastberg Hinrichsen, Iwan Quémerais, Lars BirkedalOOPSLA 2026
- Verified Lock-Free Session Channels with LinkingThomas Somers, Robbert KrebbersOOPSLA 2024 · 2 citations
- Mixed Choice in Asynchronous Multiparty Session TypesLaura Bocchi, Raymond Hu, Adriana Laura Voinea, Simon ThompsonOOPSLA 2026
