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.typ10
-rw-r--r--docs/typ/install.typ10
-rw-r--r--docs/typ/reference.typ7
4 files changed, 24 insertions, 15 deletions
diff --git a/docs/shared-libs.md b/docs/shared-libs.md
index 52457bf1..e730efbd 100644
--- a/docs/shared-libs.md
+++ b/docs/shared-libs.md
@@ -21,6 +21,14 @@ a second FreeType (tools/shared_libs_check.zig). It counts static functions
too, and several functions per family, because a release build inlines some
of them.
+## The addons are build steps (2026-11-06)
+
+The default install is the binaries alone: `zig build image`, `zig build
+pdf` (or `zig build addons`, both) builds and installs each library in
+`<prefix>/lib/pardes/addons` (and `~/.local/lib/pardes/addons` with the
+home install). MuPDF is compiled only for a step that needs it (`pdf`, the
+tests); `-Dmupdf` is gone.
+
## PDF panes became an addon (2026-11-06)
`lib/pardes/addons/pdf.so` (addons/pdf/pdf.c and pdf_bridge.c) holds MuPDF,
@@ -107,8 +115,8 @@ Text section: tty 61,369,343 → 61,294,855 bytes (**−74,488**); gui
- **Two JPEG decoders: MuPDF's libjpeg and wuffs.** MuPDF's `DCTDecode` filter
(`filter-dct.c`) is written against libjpeg's streaming source-manager API.
Moving PDFs onto wuffs means a new DCT filter for fitz. Moving image panes
- onto libjpeg instead would leave a `-Dmupdf=false` build with no JPEG
- decoder.
+ onto libjpeg instead would leave a pardes without the PDF addon with no
+ JPEG decoder.
- **MuPDF's fitz image loaders** (`fz_load_png`, `_jpeg`, `_gif`, `_bmp`,
`_tiff`, `_pnm`, `_psd`; 16.7 KiB together). They are compiled because
mupdf.zig builds all of `source/fitz`. They are reachable only through
diff --git a/docs/typ/building.typ b/docs/typ/building.typ
index 50b85986..311d98c0 100644
--- a/docs/typ/building.typ
+++ b/docs/typ/building.typ
@@ -11,10 +11,11 @@ pieces fit. To install it, see #doc("setup", section: "install").
Zig *0.17.0* (`build.zig.zon` pins `minimum_zig_version`). Dependencies are
fetched and pinned by the manifest; the terminal build needs no system
-package. The SDL shell builds SDL3 and FreeType from source. PDF support
-is an addon, `pdf.so`, built over MuPDF (its own FreeType and zlib in it)
-and on by default (`-Dmupdf=false` leaves it out); the binaries hold no
-MuPDF.
+package. The SDL shell builds SDL3 and FreeType from source. Pictures and
+PDFs are addons, each its own step: `zig build image`, `zig build pdf`
+(`pdf.so`, over MuPDF, its own FreeType and zlib in it), or `zig build
+addons` for both; the binaries hold neither, and MuPDF is compiled only
+for the `pdf` step and the tests.
#pairs(
[`zig build`], [the terminal shell and the SDL window together, *installed into `~/.local/bin`* (`pardes` and `pardes-gui`)],
@@ -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`],
- [`-Dmupdf`], [bool, `true`: build and install the PDF addon],
[`-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")],
diff --git a/docs/typ/install.typ b/docs/typ/install.typ
index 6b7c2d34..28ed67c8 100644
--- a/docs/typ/install.typ
+++ b/docs/typ/install.typ
@@ -22,9 +22,9 @@ With Zig 0.17 (the build fetches everything else; once that is
downloaded, a first build from a clean cache took 62 seconds on 16 cores):
#cmd("# pardes, in a terminal\nzig build -Dplatform=tui --prefix ~/.local")
#cmd("# pardes-gui, its own window\nzig build -Dplatform=gui --prefix ~/.local")
-Then run `pardes` or `pardes FILE`. Each also installs
+#cmd("# the image and PDF addons (or `zig build image pdf`)\nzig build addons -Dplatform=tui --prefix ~/.local")
+Then run `pardes` or `pardes FILE`. The addons are steps of their own:
`lib/pardes/addons/image.so`, the image addon, and
-`lib/pardes/addons/pdf.so`, the PDF addon (MuPDF, left out by
-`-Dmupdf=false`), which pardes loads at start from its prefix: a pardes
-without them (a downloaded binary alone) shows image files and PDFs as
-text.
+`lib/pardes/addons/pdf.so`, the PDF addon (over MuPDF), which pardes
+loads at start from its prefix; a pardes without them (a downloaded binary
+alone) shows image files and PDFs as text.
diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ
index 20c3bf06..ff035fac 100644
--- a/docs/typ/reference.typ
+++ b/docs/typ/reference.typ
@@ -983,11 +983,12 @@ Exec, a message, a new text pane, its selection) it is handed at load.
`addons/fake/fake.c` uses every function and `addons/snake/snake.c` is a
game in it; a kind with only a head and `paint` is a valid one. Pictures
are an addon too, `addons/image/image.c` (PNG, JPEG, GIF, BMP, PPM, PGM and
-TGA through stb_image, at most 1280 pixels a side), which the build
+TGA through stb_image, at most 1280 pixels a side), which `zig build image`
installs as `<prefix>/lib/pardes/addons/image.so`, and so are PDFs,
`addons/pdf/pdf.c` over MuPDF (its pages rendered on jobs, two at once),
-installed as `<prefix>/lib/pardes/addons/pdf.so` (none with
-`-Dmupdf=false`); without them an image file and a PDF open as text. A
+which `zig build pdf` installs as `<prefix>/lib/pardes/addons/pdf.so`
+(`zig build addons`, both); without them an image file and a PDF open as
+text. A
PDF on a terminal without graphics shows its page's text layer, the moving
keys and the wheel a page a step; with them its pages, a fast scroll
rendering only the rows each page shows until it rests, a touchpad's turn