Next: , Previous: , Up: Guile Hoot   [Contents][Index]


1 Introduction

Guile Hoot is a Scheme to WebAssembly (henceforth referred to as WASM) compiler backend for GNU Guile and a general purpose WASM toolchain. WASM is an abstract but low-level binary compilation target that can run on all major web browsers, and increasingly in other, more “native” contexts, as well. For over two decades, JavaScript has been the official language of the web, and while the language has improved a lot over the years, its design leaves much to be desired. Thus web developers looked for ways to bring their preferred language to the browser to use instead. In the past, the only option available was to compile that language to JavaScript! This approach worked in some sense but it was unideal because many languages do not map cleanly to JavaScript. In the case of Scheme, for example, the lack of a tail call facility makes compiling tail-recursive Scheme code unpleasant. At long last, thanks to WASM, it has become possible to use an alternative language with fewer compromises and better performance. Hoot aims to bring Guile’s “whole self” to the web, as well as to other WASM GC runtimes.

Hoot is being developed by the Spritely Institute in collaboration with Igalia to advance Spritely’s mission to build the infrastructure for a completely decentralized social Internet. And for that mission, what better platform to target than the web browser? Goblins, Spritely’s distributed object programming environment, is primarily written in Guile. So, to meet users where they are at and not use JavaScript at the same time, Spritely needs a Guile to WASM compiler!

A secondary goal of Hoot is to advocate for all dynamic programming languages’ (Python, Ruby, etc.) rightful place on the client-side web. The WASM 1.0 specification was not a habitable environment for languages that require a garbage collector. The WASM GC proposal, among others, has made it possible for dynamic languages to target WASM in a real way. However, such advances are not without their detractors. Without the necessary support, a useful proposal will never make it into the core specification. For example, strings are a particularly controversial subject in the WebAssembly Community Group and proposals that would greatly benefit Hoot and other languages have not reached consensus. Implementing and targeting emergent and useful WASM proposals helps those proposals find their way into the core specification. A rising tide lifts all boats, as they say, and while we may be little schemers, we want our work to help advance the WASM standard for all dynamic languages.


Next: Compiling to WASM, Previous: Guile Hoot, Up: Guile Hoot   [Contents][Index]