Lune

OOPSLA2023顶会

Continuing WebAssembly with Effect Handlers

Luna Phipps-Costin, Andreas Rossberg, Arjun Guha, Daan Leijen, Daniel Hillerström, K. C. Sivaramakrishnan, Matija Pretnar, Sam Lindley

摘要

WebAssembly (Wasm) is a low-level portable code format offering near native performance. It is intended as a compilation target for a wide variety of source languages. However, Wasm provides no direct support for non-local control flow features such as async/await, generators/iterators, lightweight threads, first-class continuations, etc. This means that compilers for source languages with such features must ceremoniously transform whole source programs in order to target Wasm.

We present WasmFX, an extension to Wasm which provides a universal target for non-local control features via effect handlers, enabling compilers to translate such features directly into Wasm. Our extension is minimal and only adds three main instructions for creating, suspending, and resuming continuations. Moreover, our primitive instructions are type-safe providing typed continuations which are well-aligned with the design principles of Wasm whose stacks are typed. We present a formal specification of WasmFX and show that the extension is sound. We have implemented WasmFX as an extension to the Wasm reference interpreter and also built a prototype WasmFX extension for Wasmtime, a production-grade Wasm engine, piggybacking on Wasmtime's existing fibers API. The preliminary performance results for our prototype are encouraging, and we outline future plans to realise a native implementation.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 13 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Lexical Effect Handlers, Directly 引用了 Retrofitting effect handlers onto OCaml
  • Lexical Effect Handlers, Directly 引用了 First-class names for effect handlers
  • Lexical Effect Handlers, Directly 引用了 From folklore to fact: comparing implementations of stacks and continuations
  • Modal Effect Types 引用了 Retrofitting effect handlers onto OCaml
  • Modal Effect Types 引用了 First-class names for effect handlers
  • Modal Effect Types 引用了 Soundly Handling Linearity
  • Effect Handlers for C via Coroutines 引用了 Retrofitting effect handlers onto OCaml
  • Effect Handlers for C via Coroutines 引用了 High-level effect handlers in C++
  • Retrofitting effect handlers onto OCaml 引用了 From folklore to fact: comparing implementations of stacks and continuations
  • High-level effect handlers in C++ 引用了 Retrofitting effect handlers onto OCaml
  • Soundly Handling Linearity 引用了 Retrofitting effect handlers onto OCaml
  • Soundly Handling Linearity 引用了 First-class names for effect handlers
  • Soundly Handling Linearity 引用了 High-level effect handlers in C++
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper13

  1. Mutually Iso-Recursive SubtypingAndreas RossbergOOPSLA 2023 · 8 次引用
  2. Soundly Handling LinearityWenhao Tang, Daniel Hillerström, Sam Lindley, J. Garrett MorrisPOPL 2024 · 8 次引用
  3. Lexical Effect Handlers, DirectlyCong Ma, Zhaoyi Ge, Edward Lee, Yizhou ZhangOOPSLA 2024 · 7 次引用
  4. Effect Handlers for C via CoroutinesMario Alvarez-Picallo, Teodoro Freund, Dan R. Ghica, Sam LindleyOOPSLA 2024 · 6 次引用
  5. Modal Effect TypesWenhao Tang, Leo White, Stephen Dolan, Daniel Hillerström 等OOPSLA 2025 · 4 次引用

它引用的 Paper6

  1. Retrofitting effect handlers onto OCamlK. C. Sivaramakrishnan, Stephen Dolan, Leo White, Tom Kelly 等PLDI 2021 · 56 次引用
  2. Two Mechanisations of WebAssembly 1.0Conrad Watt, Xiaojia Rao, Jean Pichon-Pharabod, Martin Bodin 等FM 2021 · 32 次引用
  3. From folklore to fact: comparing implementations of stacks and continuationsKavon Farvardin, John H. ReppyPLDI 2020 · 17 次引用
  4. High-level effect handlers in C++Dan R. Ghica, Sam Lindley, Marcos Maroñas Bravo, Maciej PirógOOPSLA 2022 · 14 次引用
  5. First-class names for effect handlersNingning Xie, Youyou Cong, Kazuki Ikemori, Daan LeijenOOPSLA 2022 · 11 次引用

相关 Paper

  1. Iris-WasmFX: Modular Reasoning for Wasm Stack SwitchingMaxime Legoupil, Mathias Pedersen, Lars Birkedal, Sam Lindley 等PLDI 2026
  2. A fast in-place interpreter for WebAssemblyBen L. TitzerOOPSLA 2022 · 44 次引用
  3. Broken Promise: Differential Analysis of Functional Discrepancies Between WebAssembly and Native BinariesXiao Wu, Alan Romano, Liyan Huang, Qiwen Yan 等WWW 2026
  4. A Formal Account of the Wasm 3.0 Concurrency ModelAzalea Raad, Michalis Kokologiannakis, Viktor Vafeiadis, Conrad WattOOPSLA 2026
  5. Bringing the WebAssembly Standard up to Speed with SpecTecDongjun Youn, Wonho Shin, Jaehyun Lee, Sukyoung Ryu 等PLDI 2024 · 30 次引用
黄昏的海面,两侧是细线勾勒的悬崖