From 8e78270a14d923afe12e13330160b76a0ca0bea4 Mon Sep 17 00:00:00 2001 From: foxnne Date: Thu, 15 Oct 2026 12:47:17 -0500 Subject: [PATCH 1/2] build: fizzy's plugins are listed; the minimal shape links two fizzy.buildApp now takes every plugin the app links, fizzy's among them (fizzy.plugins.*). The minimal shape links workbench and text beside hello and shader; the others link all of fizzy's. Needs fizzyedit/fizzy's build/app-plugin-list: the fizzy pin moves to its merge. Co-Authored-By: Claude Opus 5.5 --- README.md | 8 +++++--- build.zig | 10 ++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6fec260..f708490 100644 --- a/README.md +++ b/README.md @@ -51,12 +51,14 @@ A shape exports `pub fn layout(ctx: ?*anyopaque, f: *Layout) !dvui.App.Result` a pointer with its own GPU program (`core.programs`). It also builds alone as a dylib (`cd plugins/shader && zig build`). -`build.zig` hands both to fizzy with `fizzy.buildApp`; they are linked in and registered like -fizzy's own. +`build.zig` hands both to fizzy with `fizzy.buildApp`, in one list with the fizzy plugins the app +links (`fizzy.plugins.text`, or `fizzy.plugins.all`), and every one is linked in and registered +the same way. The minimal shape links only workbench and text; the others link all of fizzy's. +workbench is required for now. ## Your own app `build.zig` is the whole recipe: depend on fizzy (`build.zig.zon`), call `b.dependency("fizzy", …)` with your app's name, display name, bundle id, `.@"defer-app" = true` and your shape as -`app-layout`, then `fizzy.buildApp` with the plugins you bundle. Pin fizzy by commit, as this +`app-layout`, then `fizzy.buildApp` with every plugin you link, fizzy's among them. Pin fizzy by commit, as this repo does. diff --git a/build.zig b/build.zig index 1f9f1ff..f8991a6 100644 --- a/build.zig +++ b/build.zig @@ -58,10 +58,16 @@ pub fn build(b: *std.Build) !void { }); const hello = b.dependency("hello", .{ .target = target, .optimize = optimize }); const shader = b.dependency("shader", .{ .target = target, .optimize = optimize }); - try fizzy.buildApp(fizzy_dep, &.{ + // Fizzy's own plugins are entries in the list like any other. The minimal shape's one + // region takes documents, so it links the two that open them; the others link all of fizzy's. + const fizzys: []const fizzy.BundledPlugin = switch (shape) { + .minimal => &.{ fizzy.plugins.workbench, fizzy.plugins.text }, + .studio, .endless => &fizzy.plugins.all, + }; + try fizzy.buildApp(fizzy_dep, try std.mem.concat(b.allocator, fizzy.BundledPlugin, &.{ fizzys, &.{ .{ .name = "hello", .module = hello.module("plugin") }, .{ .name = "shader", .module = shader.module("plugin") }, - }); + } })); const exe = fizzy_dep.artifact(name); b.installArtifact(exe); From f9be5006e5fe450cdfbf62164ba60e8e7772b771 Mon Sep 17 00:00:00 2001 From: foxnne Date: Thu, 15 Oct 2026 15:04:40 -0500 Subject: [PATCH 2/2] build: pin fizzy at the merge of fizzyedit/fizzy#441 The first fizzy with fizzy.plugins, which build.zig now lists. Co-Authored-By: Claude Opus 5.5 --- build.zig.zon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index 91e1f87..dce3d0d 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -8,8 +8,8 @@ // by commit; fizzy's CI builds this repo against each of its pull requests, so a change // there that breaks an outside app fails before it lands. .fizzy = .{ - .url = "https://github.com/fizzyedit/fizzy/archive/75fd7f0ed1440432893238f75664e9680a56a123.tar.gz", - .hash = "fizzy-0.2.0-c46aVj4MkABq503RNbfyqugEU7A-BkJreTBFDhNbl6uF", + .url = "https://github.com/fizzyedit/fizzy/archive/b9ba48af5941aa59fdcd4b61e829c2085cf5f3d2.tar.gz", + .hash = "fizzy-0.2.0-c46aVnoclwBr5ucQF97TLn-JtdXSE9jSljrZHmz7Fia0", }, // The plugins this app bundles beyond fizzy's own: fizzyedit/example-plugin, as any // plugin from its own repo, and this app's own, which also builds alone as a dylib