summaryrefslogtreecommitdiff
path: root/src/output_pane.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-24 10:56:05 -0300
committerGabriel Schneider <[email protected]>2026-08-25 09:42:07 -0300
commitc3d0b84b7961ae26d2d654e7120821cc2d83d20d (patch)
tree0b9a060a8ff0ee7d83c8df5ca797a99e0d66c53e /src/output_pane.zig
parent70bde600793ea70bd68832018a154671c6bf1512 (diff)
downloadpardes-c3d0b84b7961ae26d2d654e7120821cc2d83d20d.tar.gz
pardes-c3d0b84b7961ae26d2d654e7120821cc2d83d20d.zip
host: the core owns the event loop; every platform becomes a vtable of optional methods
Diffstat (limited to 'src/output_pane.zig')
-rw-r--r--src/output_pane.zig12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/output_pane.zig b/src/output_pane.zig
index ecb6f957..a7763bd3 100644
--- a/src/output_pane.zig
+++ b/src/output_pane.zig
@@ -25,6 +25,7 @@ const runtime_config = @import("runtime_config.zig");
const effect_sources = @import("effect_sources.zig");
const Builtin = builtins.registry.Builtin();
const config = @import("config.zig");
+const build_options = @import("pardes_config");
const dump = @import("dump.zig");
const lsp = @import("lsp/lsp.zig");
const gui_shader_source_mode = effect_sources.guiShaderSourceMode();
@@ -472,6 +473,17 @@ pub fn openConfig(p: *Pardes, id: usize) !void {
return openRead(p, id, .{ .cmd = .Config }, "", content);
}
+/// The version banner plus the embedded CHANGELOG, so an installed binary can
+/// say what it is and what changed without a repository beside it.
+pub fn openChangelog(p: *Pardes, id: usize) !void {
+ var out: std.Io.Writer.Allocating = .init(p.gpa);
+ errdefer out.deinit();
+ try out.writer.print("pardes {s}\n\n", .{build_options.version});
+ try out.writer.writeAll(@embedFile("CHANGELOG.md"));
+ const content = try out.toOwnedSlice();
+ return openRead(p, id, .{ .cmd = .Changelog }, "", content);
+}
+
/// Print the implementation that this build actually uses for one effect.
/// Sources are build inputs embedded as bytes, so this stays useful from an
/// installed binary with no repository beside it.