summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/shared-libs.md11
-rw-r--r--docs/typ/install.typ5
-rw-r--r--docs/typ/reference.typ12
3 files changed, 23 insertions, 5 deletions
diff --git a/docs/shared-libs.md b/docs/shared-libs.md
index fe6c5018..70e585b3 100644
--- a/docs/shared-libs.md
+++ b/docs/shared-libs.md
@@ -21,6 +21,17 @@ 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.
+## Image panes became an addon (2026-11-06)
+
+`lib/pardes/addons/image.so` (addons/image/image.c) decodes image panes with
+its own stb_image, PNG, JPEG and inflate included: the binaries keep none of
+stb_image but its resize (a kitty PNG's downscale; the decoder and the writer
+are patched out of zstbi.c), and a kitty `f=100` PNG is wuffs's alone. A
+process that loads image.so holds a second PNG and JPEG decoder and inflate
+beside wuffs and zlib: a library apart, outside this policy's reach (it links
+nothing of the binary), and allocating through pardes's arenas and job
+buffers, never its own malloc. The rows below are the binaries before it.
+
## Inventory (ghostty 1.4.0, 2026-10-28)
Sizes are function bytes in the ReleaseFast symbol tables (`nm -S`). The tty
diff --git a/docs/typ/install.typ b/docs/typ/install.typ
index 7489d069..570f4313 100644
--- a/docs/typ/install.typ
+++ b/docs/typ/install.typ
@@ -22,4 +22,7 @@ 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`.
+Then run `pardes` or `pardes FILE`. Each also installs
+`lib/pardes/addons/image.so`, the image addon, which pardes loads at start
+from its prefix: a pardes without it (a downloaded binary alone) shows
+image files as text.
diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ
index be157082..7af819a1 100644
--- a/docs/typ/reference.typ
+++ b/docs/typ/reference.typ
@@ -980,8 +980,11 @@ are the header's, and what pardes does for it (an allocation from the
pane's arena, a job off the loop, a Look, a message, a new text pane) 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. Image is a kind compiled in, through the same records. The
-header is ABI 2: an addon built against another major is refused.
+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 installs as `<prefix>/lib/pardes/addons/image.so`;
+without it an image file opens as text. The header is ABI 2: an addon
+built against another major is refused.
- `tick(state, now, flags)` returns the absolute time of its next step
(0: none) on a monotonic clock. It is called when that time comes and
@@ -996,7 +999,8 @@ header is ABI 2: an addon built against another major is refused.
`petscii:on palette:commodore ascii:off` (#word("Petscii"),
#word("Palette") and #word("Ascii") are the core's words), then its
path.
-- Its jobs run on the host's workers; one asked before an
+- Its jobs run on the host's workers, allocating from what the job is
+ handed (the last allocation the answer); one asked before an
#word("Addon") `reload` answers into nothing, and the old library stays
until its last such job has answered.
- A client of the session runs no addon's code: a pane of a kind it lacks
@@ -1010,7 +1014,7 @@ header is ABI 2: an addon built against another major is refused.
the kinds here. At start, every `*.so` of `$XDG_DATA_HOME/pardes/addons`,
then of `<prefix>/lib/pardes/addons`, is loaded.
- #file("/addons"): a line a kind, `<kind> <version> <abi> <panes open>
- <path> <blake3> static|loaded`, and a line an addon refused, with why:
+ <path> <blake3> loaded`, and a line an addon refused, with why:
another ABI's major, no `pardes_addon`, a word, leader path or extension
already someone's (the core's or another addon's: refused whole), words
for its panes with no `ctl`. Each session has its own: a library is