From 8facd769003b970e7a2c933f1887e09bffb4bd08 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 21:37:08 -0300 Subject: kinds #46, the docs say pdf is Zig over MuPDF: reference.typ's Addons section (the module's init and held body, pdf.zig through pdf_bridge.c, its jobs, one place shown by each view, the text layer's lines and the glide), shared-libs.md (the library and the static build), the changelog Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- docs/shared-libs.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'docs/shared-libs.md') diff --git a/docs/shared-libs.md b/docs/shared-libs.md index 4a07f80a..b9f64fdf 100644 --- a/docs/shared-libs.md +++ b/docs/shared-libs.md @@ -34,16 +34,17 @@ tests); `-Dmupdf` is gone. `zig build static -Dplatform=tui -Dtarget=x86_64-linux-musl` links the terminal binary statically (musl: glibc links only dynamically) with both addons compiled in: image.zig as a module, its stb_image static in stb.c -beside the binary's zstbi resize, and pdf.c with MuPDF, its FreeType and -zlib, its export renamed (`-Dpardes_addon=pardes_addon_pdf`), so the -binary holds one copy of each. Addon.zig registers both at start as if +beside the binary's zstbi resize, and pdf.zig with MuPDF, its FreeType and +zlib (the module exports `pardes_addon` only from its library, so the static +binary reads its declaration), so the binary holds one copy of each. Addon.zig registers both at start as if loaded. It loads no library (a static binary has no dlopen); it is also the way a build for macOS, whose loader has no memfd, could have image and PDF panes. ## PDF panes became an addon (2026-11-06) -`lib/pardes/addons/pdf.so` (addons/pdf/pdf.c and pdf_bridge.c) holds MuPDF, +`lib/pardes/addons/pdf.so` (addons/pdf/pdf.zig, in Zig, over MuPDF through +the C of pdf_bridge.c, since 2026-11-07) holds MuPDF, built against the build's FreeType and zlib and linked into the library with them, all three compiled position-independent; it exports `pardes_addon` alone (a version script), so its FreeType and zlib never -- cgit v1.3