summaryrefslogtreecommitdiff
path: root/src
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
commit8704fa7662f40d70552daa917144987a46e14b51 (patch)
treea172f2cad349f8c5c6399281d39e2b65736463c5 /src
parentc36e38e0a26f9bdef2892621b99390dedd35686d (diff)
downloadpardes-8704fa7662f40d70552daa917144987a46e14b51.tar.gz
pardes-8704fa7662f40d70552daa917144987a46e14b51.zip
kinds #49, the static builds: `zig build static -Dplatform=tui -Dtarget=x86_64-linux-musl` and `zig build static -Dplatform=gui` (dynamic, both addons in) build and open a PNG and a PDF over 9P with `/addons` saying builtin; `Addon load` in a pardes with its addons compiled in is refused in words (`not on this platform: its addons are compiled in`) rather than by a failed dlopen, and building.typ and shared-libs.md name the gui's static step
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src')
-rw-r--r--src/Addon.zig1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Addon.zig b/src/Addon.zig
index 209c761a..d39a27f3 100644
--- a/src/Addon.zig
+++ b/src/Addon.zig
@@ -112,6 +112,7 @@ fn read(data: []const u8, path: []const u8, words: *[64]LoadedWord, why: *Why) L
/// (dlopen hands back the handle it has for a path it has), unless this
/// process holds those very bytes already.
fn hold(path: []const u8, hash: *[32]u8, why: *Why) ?*Lib {
+ if (comptime compiled_in.len > 0) return failNull(why, "not on this platform: its addons are compiled in", .{});
var z: [4096]u8 = undefined;
const path_z = std.fmt.bufPrintSentinel(&z, "{s}", .{path}, 0) catch return failNull(why, "the path is too long", .{});
const f = std.c.fopen(path_z, "r") orelse return failNull(why, "cannot read it", .{});