Repository navigation
build: an app lists the fizzy plugins it links - #441
Merged
Merged
Conversation
fizzy.plugins.{workbench,text,image,archive,markdown,devtools} are entries in the list
fizzy.buildApp takes, beside the app's own; build/plugins.zig's link builds fizzy's for each
executable and re-homes the app's, for the native exe and the web build alike. Only listed
plugins register or get a dylib. workbench must be listed while the editor holds its state;
markdown is always compiled, for the store's READMEs. A list naming none of fizzy's still gets
all of them, until fizzyedit/example-app lists them (plans#13 step 2 removes it).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
foxnne
marked this pull request as ready for review
October 15, 2026 19:54
3 of 5 tasks
foxnne
added a commit
to fizzyedit/example-app
that referenced
this pull request
Oct 15, 2026
The first fizzy with fizzy.plugins, which build.zig now lists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
foxnne
added a commit
that referenced
this pull request
Oct 16, 2026
Part of fizzyedit/plans#13 (step 2). Builds on #441. ## What changes An app built on fizzy can run with linked plugins only: ```zig const fizzy_dep = b.dependency("fizzy", .{ …, .@"defer-app" = true, .@"dynamic-plugins" = false }); ``` (or `zig build -Ddynamic-plugins=false`). In that build: - **No plugin dylib is built or installed.** fizzy's four bundled ones are skipped, as are the packaged copies. - **Nothing loads at runtime.** One comptime constant, `App.loads_plugins`, turns off: - the bundled-dylib probe in `postInit` - the user plugins directory scan (`loadUserPlugins`) - loading a plugin by id (the store's and settings' enable path) - a web page's `?plugin=` request - **No store.** `PluginStore.register` still sets the `PluginManager` (settings name plugins through it), then returns before the catalog fetch and the store's view. `tick` returns at once. Every gate is comptime, as wasm's are, so a dynamic build checks nothing at runtime. Most other dynamic paths go quiet on their own when nothing is `dlopen`ed: the rebuilt-plugin watcher walks only the loaded libraries. CI compiles the link-only build on Linux (`-Ddynamic-plugins=false -Dno-emit`, about 10 s locally), because its gates are comptime and the default build never compiles that branch. ## SDK impact - [x] None ## Verified - [x] macOS: - **Build:** `zig build -Ddynamic-plugins=false` installs only the executable, with no `plugins/` directory. - **Runtime:** a `text.dylib` planted beside the executable and in the profile's user plugins directory is not mapped into the link-only process (`vmmap`). The default build, run with the same profile, maps all four of fizzy's dylibs. - **Screenshots:** the link-only window has no store icon in the rail, and the default build has it above the settings cog. - **Gates on the default build:** `zig build`, `test` (91/91 steps), `test-integration` (53/53 steps), `check-tests-reached`, `test-sdk-version`, `check-fmt`. - **Web:** `check-web` with and without the flag. - [ ] Windows: - [ ] Linux: CI (including the new link-only compile) - [x] Web: compiles link-only; not run in a browser Not exercised: opening Settings in the link-only build. Its plugin rows read through the `PluginManager`, which is set as before. ## Follow-ups - **Removing the `buildApp` fallback** (a list naming none of fizzy's plugins gets all of them) waits until fizzyedit/example-app#6 is on example-app's `main`, because fizzy's CI builds that `main`. It's a small PR after the repin. - **example-app: a link-only build** in its CI and in `check-examples.sh`, after this merges, for the same ordering reason. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of fizzyedit/plans#13 (step 1).
What changes
An app built on fizzy chooses which of fizzy's plugins it links.
fizzy.plugins.{workbench,text,image,archive,markdown,devtools}are entries in the listfizzy.buildApptakes, beside the app's own, andfizzy.plugins.allis fizzy's own set:Fizzy's own entries have no module:
build/plugins.zig'slinkbuilds each one for every executable (native, packaged, web), wired to that executable's framework, and re-homes the app's modules the way the native and web builds each did on their own before. Fizzy's build passesfizzy.plugins.allthrough the same path, so the exe and the web build no longer keep separate copies of the list. The test build keeps its own list, because it tests fizzy itself. A plugin that isn't listed doesn't register, and fizzy's dylib for it (text, markdown, image) is neither built nor installed.Two plugins are always built, because fizzy's own code imports them as libraries. workbench must be listed: the editor still holds its state (
editor.workbench, the dylib'sarg_c), and a list without it fails the build with a message naming the plan. markdown is always compiled, because the store draws READMEs with it, but it only registers as a plugin when listed.Transition: fizzy's CI builds example-app's
main, and example-app pins fizzy by commit, so neither repo can make the change first. Until example-app lists fizzy's plugins, abuildApplist that names none of them gets all of them first, as before. That fallback is three lines inbuildApp, and step 2 removes it. fizzyedit/example-app#6 lists them explicitly (its minimal shape links only workbench and text), and it repins to this once merged.Also:
Entry.zigdrops an unused@import("text").postInitcomment no longer says the bundled plugins don't ship as dylibs. They do, and it now says why.AGENTS.mddescribes the list.Overlaps in files only with the Zig 0.17 drafts (#437, #438), which touch the whole build; this change touches no build step.
SDK impact
Verified
zig build,check-web,test,test-integration,test-sdk-version,check-fmt. The four built-in dylibs are still installed tozig-out/<target>/plugins/.scripts/check-examples.shpasses against example-app with explicit lists (its minimal shape links only workbench and text), and against example-app'smainthrough the fallback.check-webFollow-ups
🤖 Generated with Claude Code