Toolkit sizes
Generated by node scripts/sizes.mjs on 2026-10-27. Each cell is
wasm file size / initial linear memory (static data plus the 64 KiB stack, before
og_arena grows memory for the framebuffer). Framebuffers are sized from the
device at og_init time: 1 KiB on a 128×64 MONO1 screen, 2.3 MiB on a 1024×600 RGBA
one.
| Template | O2 | Oz | LTO (Oz) | O2, no SIMD |
|---|---|---|---|---|
| blank | 39.4 KiB / 512 KiB | 22.9 KiB / 512 KiB | 22.6 KiB / 512 KiB | 37.0 KiB / 512 KiB |
| drums | 51.6 KiB / 128 KiB | 28.0 KiB / 128 KiB | 27.6 KiB / 128 KiB | 46.9 KiB / 128 KiB |
| mono-synth | 47.4 KiB / 128 KiB | 27.6 KiB / 128 KiB | 27.1 KiB / 128 KiB | 45.3 KiB / 128 KiB |
How to read it:
wasm-ldalready drops unused toolkit objects and functions, so most of the difference between the columns comes from code generation.-Ozis the size choice. LTO adds little on top of it, because the toolkit's modules have few calls between them.-O2(the default) favours speed.- SIMD adds about 2–5 KiB at
-O2, mostly loops the compiler vectorized automatically. Use--opt Ozwhen size matters more than speed.