[READ-ONLY] Mirror of https://github.com/bombshell-dev/tty. Platform independent 2D layout engine for terminal applications based on Clay
5

Configure Feed

Select the types of activity you want to include in your feed.

ref: rename to layout.wasm and input.wasm

authored by

Nate Moore and committed by
Nate Moore
(Jul 1, 2026, 9:48 PM EDT) 2226d2dc c9ed97a2

+38 -28
+4 -2
.github/workflows/verify.yaml
··· 48 48 with: 49 49 name: clayterm-wasm 50 50 path: | 51 - clayterm.wasm 52 - wasm.ts 51 + layout.wasm 52 + input.wasm 53 + layout.wasm.ts 54 + input.wasm.ts 53 55 54 56 test-alt-os: 55 57 needs: test
+4 -4
.gitignore
··· 1 1 /.agent-shell/ 2 - /clayterm-layout.wasm 3 - /clayterm-input.wasm 4 - /wasm-layout.ts 5 - /wasm-input.ts 2 + /layout.wasm 3 + /input.wasm 4 + /layout.wasm.ts 5 + /input.wasm.ts 6 6 /build/ 7 7 /node_modules/
+13 -9
BUILD.md
··· 18 18 19 19 It generates: 20 20 21 - - `clayterm.wasm` — the compiled WebAssembly module built from the C sources 22 - - `wasm.ts` — a generated TypeScript file derived from `clayterm.wasm` 21 + - `layout.wasm` — the layout WebAssembly module built from the C sources 22 + - `input.wasm` — the input WebAssembly module built from the C sources 23 + - `layout.wasm.ts` — generated TypeScript derived from `layout.wasm` 24 + - `input.wasm.ts` — generated TypeScript derived from `input.wasm` 23 25 24 - `wasm.ts` is generated output, not hand-maintained source. 26 + These `.ts` files are generated output, not hand-maintained source. 25 27 26 28 ## Clone the repo with submodules 27 29 ··· 184 186 185 187 This should produce: 186 188 187 - - `clayterm.wasm` 188 - - `wasm.ts` 189 + - `layout.wasm` 190 + - `input.wasm` 191 + - `layout.wasm.ts` 192 + - `input.wasm.ts` 189 193 190 194 For a clean rebuild: 191 195 ··· 199 203 200 204 - you change files under `src/` 201 205 - you update the `clay` submodule 202 - - `clayterm.wasm` or `wasm.ts` is missing 206 + - `layout.wasm`, `input.wasm`, `layout.wasm.ts`, or `input.wasm.ts` is missing 203 207 - generated outputs look stale after switching branches or pulling changes 204 208 205 209 When in doubt, use a clean rebuild: ··· 249 253 Symptoms may include: 250 254 251 255 - target-related `clang` errors mentioning `wasm32` 252 - - linker failures while producing `clayterm.wasm` 256 + - linker failures while producing the `.wasm` outputs 253 257 254 258 Recovery: 255 259 ··· 270 274 271 275 Symptoms may include: 272 276 273 - - `clayterm.wasm` is missing 274 - - `wasm.ts` is missing 277 + - `layout.wasm` or `input.wasm` is missing 278 + - `layout.wasm.ts` or `input.wasm.ts` is missing 275 279 - you changed `src/` or updated `clay/`, but the generated outputs do not match 276 280 277 281 Recovery:
+10 -10
Makefile
··· 50 50 51 51 DEPS = $(wildcard src/*.c src/*.h) 52 52 53 - all: clayterm-layout.wasm clayterm-input.wasm wasm-layout.ts wasm-input.ts 54 - @echo "Built clayterm-layout.wasm ($$(wc -c < clayterm-layout.wasm) bytes raw, $$(gzip -c clayterm-layout.wasm | wc -c) bytes gzip)" 55 - @echo "Built clayterm-input.wasm ($$(wc -c < clayterm-input.wasm) bytes raw, $$(gzip -c clayterm-input.wasm | wc -c) bytes gzip)" 53 + all: layout.wasm input.wasm layout.wasm.ts input.wasm.ts 54 + @echo "Built layout.wasm ($$(wc -c < layout.wasm) bytes raw, $$(gzip -c layout.wasm | wc -c) bytes gzip)" 55 + @echo "Built input.wasm ($$(wc -c < input.wasm) bytes raw, $$(gzip -c input.wasm | wc -c) bytes gzip)" 56 56 57 - clayterm-layout.wasm: $(DEPS) 57 + layout.wasm: $(DEPS) 58 58 $(CC) $(CFLAGS) $(LAYOUT_LDFLAGS) -o $@ src/module-layout.c 59 59 60 - clayterm-input.wasm: $(DEPS) 60 + input.wasm: $(DEPS) 61 61 $(CC) $(filter-out -DCLAY_IMPLEMENTATION -DCLAY_WASM, $(CFLAGS)) $(INPUT_LDFLAGS) -o $@ src/module-input.c 62 62 63 - wasm-layout.ts: clayterm-layout.wasm 64 - deno run --allow-read --allow-write tasks/bundle-wasm.ts clayterm-layout.wasm wasm-layout.ts 63 + layout.wasm.ts: layout.wasm 64 + deno run --allow-read --allow-write tasks/bundle-wasm.ts layout.wasm layout.wasm.ts 65 65 66 - wasm-input.ts: clayterm-input.wasm 67 - deno run --allow-read --allow-write tasks/bundle-wasm.ts clayterm-input.wasm wasm-input.ts 66 + input.wasm.ts: input.wasm 67 + deno run --allow-read --allow-write tasks/bundle-wasm.ts input.wasm input.wasm.ts 68 68 69 69 clean: 70 - rm -f clayterm.wasm clayterm-layout.wasm clayterm-input.wasm wasm.ts wasm-layout.ts wasm-input.ts 70 + rm -f layout.wasm input.wasm layout.wasm.ts input.wasm.ts 71 71 72 72 .PHONY: all clean
+1 -1
input-native.ts
··· 169 169 delay(st: number): number; 170 170 } 171 171 172 - import { compiled } from "./wasm-input.ts"; 172 + import { compiled } from "./input.wasm.ts"; 173 173 174 174 export async function createInputNative( 175 175 escLatency: number,
+5 -1
tasks/bundle-wasm.ts
··· 27 27 return out.join(""); 28 28 } 29 29 30 - const [input = "clayterm.wasm", output = "wasm.ts"] = Deno.args; 30 + const [input, output] = Deno.args; 31 + if (!input || !output) { 32 + console.error("Usage: bundle-wasm.ts <input.wasm> <output.ts>"); 33 + Deno.exit(1); 34 + } 31 35 32 36 const wasm = await Deno.readFile(input); 33 37
+1 -1
term-native.ts
··· 48 48 errorMessage(ct: number, index: number): string; 49 49 } 50 50 51 - import { compiled } from "./wasm-layout.ts"; 51 + import { compiled } from "./layout.wasm.ts"; 52 52 53 53 export async function createTermNative( 54 54 w: number,