diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-28 21:23:53 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-28 21:46:53 -0300 |
| commit | 3ad8a8117435124d5df8c1d70de62c32dd97e113 (patch) | |
| tree | 1a62696a04308a64f5122a17a8f0fabeae393677 /src/hunks.zig | |
| parent | b250eb6135475699a945324c005890e8e1b4dd0b (diff) | |
| download | pardes-3ad8a8117435124d5df8c1d70de62c32dd97e113.tar.gz pardes-3ad8a8117435124d5df8c1d70de62c32dd97e113.zip | |
one copy of each codec: PNG and JPEG through wuffs (ghostty's, already linked by ghostty-vt), stb_image without them, its writer and its inflate, SDL without its private stb_image; a symbol-table guard; docs/shared-libs.md
ReleaseFast before, both binaries carried stb_image's PNG, JPEG and inflate beside wuffs's (whose function tables keep its decoders linked whatever pardes calls), stb_image_write and its deflate (unused), and the GUI a second stb_image of SDL's (SDL_stb.c, for SDL_LoadPNG and camera MJPEG). Now:
- image.zig decodes PNG and JPEG with wuffs (`wuffs_images`, wherever ghostty-vt is in the build), sized from the IHDR or the first SOF before decoding, as stb's info call sized them; other formats and the builds without ghostty-vt keep stb_image.
- build.zig compiles zstbi with -DSTBI_NO_PNG -DSTBI_NO_JPEG and patches its stb_image_write include out (one count-checked anchor; a no-op stbi_flip_vertically_on_write stays for zstbi.deinit), and SDL with SDL_DISABLE_STB.
Text: tty -74,488 bytes, gui -154,392.
`zig build shared-libs-check` (in unit-test, ELF) reads the linked symbol table and fails on a family the build chose against: stb's PNG/JPEG/inflate beside wuffs, a second stb_image, stb_image_write's deflate, a second zlib or FreeType. Checked against the old binaries: it names every one.
docs/shared-libs.md: the inventory (implementation, users, copies and bytes before and after, allocator hook) and where one copy was not possible: zlib and wuffs both inflate (FreeType's and MuPDF's zlib API vs ghostty's kitty o=z), MuPDF's libjpeg beside wuffs (filter-dct.c is libjpeg's API), MuPDF's unreached fitz image loaders, base64 in Zig std/simdutf/MuPDF, per-library Unicode code, std.debug's flate.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/hunks.zig')
0 files changed, 0 insertions, 0 deletions
