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]