Show simple item record

dc.rights.licenseCC-BY-NC-ND
dc.contributor.advisorVassena, Marco
dc.contributor.authorApoorva Anand, Apoorva
dc.date.accessioned2025-10-15T23:03:10Z
dc.date.available2025-10-15T23:03:10Z
dc.date.issued2025
dc.identifier.urihttps://studenttheses.uu.nl/handle/20.500.12932/50545
dc.description.abstractThis thesis presents the design and implementation of a WasmGC backend for MicroHs, a lightweight Haskell compiler. The backend targets modern WebAssembly runtimes with native garbage collection support. Functional languages require a garbage collector; we can either implement our own or reuse the one provided by the host system. Reusing the host's garbage collector reduces the binary size. To this end, we develop a WasmGC encoding of SK combinators, the theoretical foundation of MicroHs, and implement a reduction machine entirely in WasmGC. The runtime system is realized in two ways: as handwritten WasmGC code and through code generation using a Haskell-based DSL. The code generation automates the encoding of SK reduction rules, whereas the handwritten part of the runtime system forms the rest of it. Together, these components form our native WasmGC runtime. Unfortunately, we were unable to port enough of MicroHs' runtime to be able to run any Haskell programs, although the approach demonstrates potential. Using the MicroHs test suite, median binary sizes were measured as 45.3 KB for WasmGC, 161.2 KB for C, and 203 KB for Wasm 1.0.
dc.description.sponsorshipUtrecht University
dc.language.isoEN
dc.subjectMicroHs, a minimal Haskell compiler, comes with a C backend and runtime system which is easily compiled to Wasm. This thesis attempts to build a native WebAssembly backend for MicroHs using WasmGC.
dc.titleTowards a WebAssembly Backend for MicroHs
dc.type.contentMaster Thesis
dc.rights.accessrightsOpen Access
dc.subject.courseuuComputing Science
dc.thesis.id54619


Files in this item

Thumbnail

This item appears in the following Collection(s)

Show simple item record