Asterius is a Haskell to WebAssembly compiler, based on GHC. Asterius emits WebAssembly from Cmm, includes a custom JavaScript runtime, and implements a novel FFI interface for JavaScript interop.
In this talk we will discuss some of the most interesting aspects of Asterius, including: - The WebAssembly instruction set, how we target it from Cmm, and the inner workings of Asterius’ linker. - The JavaScript runtime and how it works with the generated WebAssembly. More specifically, we focus on two main components of the runtime: the storage manager, which is in charge of garbage collection, and the scheduler, which implements multi-threads and MVars. JavaScript is asynchronous by nature, which poses interesting challenges for the scheduler design. - The JavaScript FFI, including its syntax and code generation. Template Haskell: how we link and run the splices, and limitations of the current implementation.
We will also touch briefly on future challenges: - Host garbage collection, which will allow us to represent closures as managed objects on the host platform and leverage the host platform’s GC mechanism. - C toolchain integration, which will enable us to compile and link C sources in Haskell packages, and take advantage of C standard library functions in the runtime.
Fri 28 AugDisplayed time zone: Eastern Time (US & Canada) change
09:00 - 12:00 | |||
09:00 22mTalk | Asterius: bringing Haskell to WebAssembly HIW | ||
09:22 22mTalk | Multiple Home Units HIW Hannes Siebenhandl None | ||
10:00 35mTalk | Lightning Talks 1 HIW | ||
10:35 22mTalk | Sweet Egison: a Haskell Library for Non-Deterministic Pattern Matching HIW Satoshi Egi Rakuten Institute of Technology, Rakuten, Inc. / The University of Tokyo, Akira Kawata Kyoto University, Mayuko Kori The University of Tokyo, Hiromi Ogawa University of Tsukuba | ||
10:57 22mTalk | Updating Immutable Code HIW | ||
11:19 12mTalk | GHC Status Update HIW | ||
11:31 29mBreak | Social break HIW |