Next: , Up: Introduction   [Contents][Index]


1.1 Status

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 (Guile Reference)Prompts.

Missing R7RS-small features include:

  1. Libraries (define-library, import, etc.)
  2. Record types (define-record-type)
  3. Complex numbers (constants are supported, math procedures are not)
  4. Bignum constants (bignums can be computed, however)
  5. Symbols/keywords (in secondary WASM modules with imported Scheme ABI)
  6. Mutable strings (string-set!)
  7. Scheme reader (read)
  8. Environments and evaluation (environment, eval, etc.)
  9. System interface (get-environment-variable, current-jiffy, etc.)
  10. Promises (delay, force)

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. As of writing, WASM GC and tail calls are transitioning from being gated by experimental feature flags to being generally available in all major web browsers.

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.

Hoot’s usability in the browser is a work-in-progress. The reflect.js library is provided to allow JavaScript to call Scheme procedures and inspect Scheme values. However, a foreign function interface to call host functions from Scheme is not yet available.


Next: Installation, Up: Introduction   [Contents][Index]