https://gitlab.synchro.net/main/sbbs/-/commit/73e8a2b86aef81d203206a43
Modified Files:
src/syncterm/wren_embed_gen.c
Log Message:
SyncTERM: minify embedded Wren scripts
wren_embed_gen now runs each script through a small in-place minifier
before emitting it as a C string literal:
- // line comments and /* */ block comments stripped (Wren allows
nested block comments — the minifier handles nesting).
- Per-line leading and trailing whitespace stripped.
- Runs of blank lines collapsed to a single newline.
- Newlines preserved as Wren statement separators.
- String literals (and their %() interpolations) pass through
verbatim — content inside "..." is never touched. A small
state stack tracks alternating CODE / STRING; on stack overflow
the tail gets copied without further minification.
Cuts embedded_scripts.c from ~306 KiB to ~165 KiB (-46%) and the
.text bytes that actually live in the binary at runtime drop in
proportion.
Co-Authored-By: Claude Opus 4.7 (1M context) <
noreply@anthropic.com>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net