Next: Installation, Up: Introduction [Contents][Index]
Hoot’s Wasm output is compatible with Google Chrome starting with version 119 and Mozilla Firefox starting with version 121. As of writing, WebKit/Apple Safari is not yet compatible.
Hoot is still in an early phase of active development and its API should be considered unstable and subject to change in future releases. Hoot currently supports a subset of the R7RS-small Scheme specification, along with a small set of Guile-specific functionality such as prompts.
The largest missing pieces from Hoot’s R7RS-small support are
environments and evaluation (environment
, eval
, etc.)
which would allow for runtime interpretation of Scheme. Future
releases will add support for all of R7RS-small and eventually full
Guile-flavored Scheme.
To compile Scheme to Wasm, Hoot takes advantage of several new Wasm
proposals. The most important of these new features are tail calls
and GC reference types. The return_call
family of instructions
has made the implementation of Scheme’s tail recursive procedure call
semantics relatively straightforward. GC reference type instructions
allow for heap allocated objects (and immediates via the i31
type) that are managed by the Wasm runtime. This allows Hoot to take
advantage of production garbage collectors already present in web
browsers, obviating the need to implement and ship our own which would
be both inferior to the host’s and a major source of binary bloat.
There’s an additional Wasm proposal that Hoot has been built on that has, unfortunately, not found its way into the core Wasm specification: stringref. We still emit stringref, but it is reduced to being an intermediate form. A lowering pass replaces stringref instructions with something resembling the JS String Builtins proposal.
Next: Installation, Up: Introduction [Contents][Index]