# accidentally quadratic

Published articles for accidentally quadratic.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Wastrel Compiles Hoot Scheme-to-WebAssembly Output

DevFeed: [Wastrel Compiles Hoot Scheme-to-WebAssembly Output](<https://devfeed.tech/articles/wastrelly-wabbits-35034.md>)

Original publisher: [Read original article](<https://wingolog.org/archives/2026/03/31/wastrelly-wabbits>)

Author: Andy Wingo

Published: 2026-03-31T20:34:23Z

Content type: article

Language: en

Sources: [wingolog](<https://devfeed.tech/sources/wingolog.md>)

Topics: [WebAssembly](<https://devfeed.tech/topics/web-assembly.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [scheme](<https://devfeed.tech/topics/scheme.md>)

Tags: [accidentally-quadratic](<https://devfeed.tech/tags/accidentally-quadratic.md>), [aot](<https://devfeed.tech/tags/aot.md>), [bigint](<https://devfeed.tech/tags/bigint.md>), [bignums](<https://devfeed.tech/tags/bignums.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [gc](<https://devfeed.tech/tags/gc.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [gmp](<https://devfeed.tech/tags/gmp.md>), [hoot](<https://devfeed.tech/tags/hoot.md>), [igalia](<https://devfeed.tech/tags/igalia.md>), [library](<https://devfeed.tech/tags/library.md>), [maps](<https://devfeed.tech/tags/maps.md>), [precision](<https://devfeed.tech/tags/precision.md>), [scheme](<https://devfeed.tech/tags/scheme.md>), [standard](<https://devfeed.tech/tags/standard.md>), [tail-calls](<https://devfeed.tech/tags/tail-calls.md>), [wasm](<https://devfeed.tech/tags/wasm.md>), [wastrel](<https://devfeed.tech/tags/wastrel.md>), [webassembly](<https://devfeed.tech/tags/webassembly.md>), [whippet](<https://devfeed.tech/tags/whippet.md>)

### AI overview

The article describes recent work on Wastrel, an ahead-of-time WebAssembly compiler, including compiling output from the Hoot Scheme-to-Wasm compiler. It covers implementing bignum operations with mini-gmp and updating Hoot to use standardized WebAssembly exception handling.

### Source excerpt

Good day! Today (tonight), some notes on the last couple months of Wastrel, my ahead-of-time WebAssembly compiler. Back in the beginning of February, I showed Wastrel running programs that use garbage collection, using an embedded copy of the Whippet collector, specialized to the types present in the Wasm program. But, the two synthetic GC-using programs I tested on were just ported microbenchmarks, and didn't reflect the output of any real toolchain. In this cycle I worked on compiling the output from the Hoot Scheme-to-Wasm compiler. There were some interesting challenges! bignums When I originally wrote the Hoot compiler, it targetted the browser, which already has a bignum implementation in the form of BigInt, which I worked on back in the day. Hoot-generated Wasm files use host bigints via externref (though wrapped in structs to allow for hashing and identity). In Wastrel, then, I implemented the imports that implement bignum operations: addition, multiplication, and so on. I did so using mini-gmp, a stripped-down implementation of the workhorse GNU multi-precision library. At some point if bignums become important, this gives me the option to link to the full GMP instead. Bignums were the first managed data type in Wastrel that wasn't defined as part of the Wasm module itself, instead hiding behind externref, so I had to add a facility to allocate type codes to these "host" data types. More types will come in time: weak maps, ephemerons, and so on. I think bignums would be a great proposal for the Wasm standard, similar to stringref ideally (sniff!), possibly in an attenuated form. exception handling Hoot used to emit a pre-standardization form of exception handling, and hadn't gotten around to updating to the newer version that was standardized last July. I updated Hoot to emit the newer kind of exceptions, as it was easier to implement them in Wastrel that way. Some of the problems Chris Fallin contended with in Wasmtime don't apply in the Wastrel case: sinc