summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/shared-libs.md12
-rw-r--r--docs/typ/building.typ2
2 files changed, 13 insertions, 1 deletions
diff --git a/docs/shared-libs.md b/docs/shared-libs.md
index 384dc2f1..4a07f80a 100644
--- a/docs/shared-libs.md
+++ b/docs/shared-libs.md
@@ -29,6 +29,18 @@ pdf` (or `zig build addons`, both) builds and installs each library in
home install). MuPDF is compiled only for a step that needs it (`pdf`, the
tests); `-Dmupdf` is gone.
+## One static pardes (2026-11-06)
+
+`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
+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,
diff --git a/docs/typ/building.typ b/docs/typ/building.typ
index 311d98c0..8520fbbf 100644
--- a/docs/typ/building.typ
+++ b/docs/typ/building.typ
@@ -22,6 +22,7 @@ for the `pdf` step and the tests.
[`zig build -Dplatform=tui`], [the terminal shell alone],
[`zig build -Dplatform=gui`], [the SDL3 window alone],
[`zig build -Dplatform=macos`], [an AppKit and CoreText app over a static `libpardes.a` (`docs/macos.md`)],
+ [`zig build static -Dplatform=tui -Dtarget=x86_64-linux-musl`], [one statically linked `pardes` with the image and PDF addons compiled in (`/addons` lists them `builtin`); musl's, as glibc links only dynamically, and never the default],
)
A bare `zig build` installs into the prefix (`zig-out`, or `--prefix
@@ -40,7 +41,6 @@ must share with its session; `pardes --help` lists every flag.
#pairs(
[`-Dplatform`], [`tui`, `gui`, `macos`; absent: the tui and SDL shells together, installed into `~/.local`],
- [`-Dstatic`], [bool, `false`],
[`-Djpx`], [bool, `true`: JPEG 2000, and with it scanned PDFs],
[`-Dtree-sitter`], [`disabled`, `zig`, `minimal`, `full`; `full`],
[`-Dembed-sources`], [bool, `false`: serve the sources under #file("/src")],