[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.

Merge pull request #35 from bombshell-dev/ref/opt

🧼 optimize install size

authored by

Nate Moore and committed by
GitHub
(May 26, 2026, 6:48 PM EDT) ef9a3ed7 c9fec361

+34 -6
+31 -3
Makefile
··· 3 3 SRC = src/module.c 4 4 5 5 CFLAGS = --target=wasm32 -nostdlib -O2 \ 6 + -ffunction-sections -fdata-sections \ 7 + -mbulk-memory \ 6 8 -DCLAY_IMPLEMENTATION -DCLAY_WASM \ 7 9 -Isrc -I. 8 10 11 + EXPORTS = \ 12 + -Wl,--export=__heap_base \ 13 + -Wl,--export=clayterm_size \ 14 + -Wl,--export=init \ 15 + -Wl,--export=reduce \ 16 + -Wl,--export=output \ 17 + -Wl,--export=length \ 18 + -Wl,--export=measure \ 19 + -Wl,--export=Clay_SetPointerState \ 20 + -Wl,--export=pointer_over_count \ 21 + -Wl,--export=pointer_over_id_string_length \ 22 + -Wl,--export=pointer_over_id_string_ptr \ 23 + -Wl,--export=get_element_bounds \ 24 + -Wl,--export=error_count \ 25 + -Wl,--export=error_type \ 26 + -Wl,--export=error_message_length \ 27 + -Wl,--export=error_message_ptr \ 28 + -Wl,--export=input_size \ 29 + -Wl,--export=input_init \ 30 + -Wl,--export=input_scan \ 31 + -Wl,--export=input_count \ 32 + -Wl,--export=input_event \ 33 + -Wl,--export=input_delay 34 + 9 35 LDFLAGS = -Wl,--no-entry \ 10 36 -Wl,--import-memory \ 11 37 -Wl,--stack-first \ 12 - -Wl,--export-all \ 38 + -Wl,--strip-all \ 39 + -Wl,--gc-sections \ 13 40 -Wl,--undefined=Clay__MeasureText \ 14 - -Wl,--undefined=Clay__QueryScrollOffset 41 + -Wl,--undefined=Clay__QueryScrollOffset \ 42 + $(EXPORTS) 15 43 16 44 all: $(TARGET) wasm.ts 17 - @echo "Built $(TARGET) ($$(wc -c < $(TARGET)) bytes)" 45 + @echo "Built $(TARGET) ($$(wc -c < $(TARGET)) bytes raw, $$(gzip -c $(TARGET) | wc -c) bytes gzip)" 18 46 19 47 DEPS = $(wildcard src/*.c src/*.h) 20 48
+3 -3
tasks/build-npm.ts
··· 20 20 typeCheck: false, 21 21 compilerOptions: { 22 22 lib: ["ESNext"], 23 - target: "ES2020", 24 - sourceMap: true, 25 23 }, 24 + skipSourceOutput: true, 26 25 package: { 27 26 name: "clayterm", 28 27 version, ··· 37 36 url: "https://github.com/bombshell-dev/clayterm/issues", 38 37 }, 39 38 engines: { 40 - node: ">= 16", 39 + node: ">= 22", 41 40 }, 42 41 sideEffects: false, 42 + type: "module", 43 43 }, 44 44 }); 45 45