BBS:      TELESC.NET.BR
Assunto:  src/syncterm/wren_embed_gen.c
De:       Deuc¨
Data:     Fri, 1 May 2026 10:22:04 -0700
-----------------------------------------------------------
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) 
n
---
  mSynchronetn  hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net

-----------------------------------------------------------
[Voltar]