summaryrefslogtreecommitdiff
path: root/src/Addon.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 22:49:11 -0300
committerGabriel Schneider <[email protected]>2026-11-06 23:38:31 -0300
commitc36e38e0a26f9bdef2892621b99390dedd35686d (patch)
treec5817e8f3be6c9a2c930bd0d3576752e5feef070 /src/Addon.zig
parent227111c84a2945087abb4395daf63c7b23ba5bab (diff)
downloadpardes-c36e38e0a26f9bdef2892621b99390dedd35686d.tar.gz
pardes-c36e38e0a26f9bdef2892621b99390dedd35686d.zip
kinds #48, the export rule finished: every Zig kind declares `pub const pardes_addon = addon.ops(T)` and calls `addon.exportLib(&pardes_addon)` in a comptime block, which exports it only when the output is a library (Zig 0.17 analyses no `pub const` of a library's root and no comptime block of a type made in a generic function, so the export cannot live in `ops` alone: one comptime line in the kind is the spelling that works), and a pardes with kinds compiled in reads the declarations; image.zig's `pub export`, snake's and life's `export` go, no rename anywhere, and fake.c stays the loader's test, never compiled in
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/Addon.zig')
-rw-r--r--src/Addon.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Addon.zig b/src/Addon.zig
index 04cffcb9..209c761a 100644
--- a/src/Addon.zig
+++ b/src/Addon.zig
@@ -175,9 +175,9 @@ var found_text: [Kind.max_kinds][2][4096]u8 = undefined;
var nfound: usize = 0;
/// A static pardes's addons (`zig build static`), compiled in: the image
-/// addon's module and the PDF's C, its `pardes_addon` renamed. A static
-/// binary cannot dlopen, and macOS's loader has no memfd: this is how
-/// either has image and PDF panes.
+/// and pdf modules' `pardes_addon` declarations, which only a library
+/// exports. A static binary cannot dlopen, and macOS's loader has no
+/// memfd: this is how either has image and PDF panes.
const compiled_in: []const *const Kind.Ops = if (@import("builtin_addons").on) &.{ &@import("image_addon").pardes_addon, &@import("pdf_addon").pardes_addon } else &.{};
/// The addons compiled in, as if loaded (`builtin` their path); else every