Repository navigation
app: a link-only build, which loads no plugin at runtime - #445
Merged
Merged
Conversation
-Ddynamic-plugins=false (a buildApp dependency option too) makes an app run exactly the plugins it links. No plugin dylib is built, and App.loads_plugins (comptime) turns off the bundled-dylib probe, the user plugins directory scan, loading a plugin by id, a web page's ?plugin= request, and the store (PluginStore.register keeps the manager, which settings read, then returns; tick returns). CI compiles it on Linux. 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 2). Builds on #441.
What changes
An app built on fizzy can run with linked plugins only:
(or
zig build -Ddynamic-plugins=false). In that build:App.loads_plugins, turns off:postInitloadUserPlugins)?plugin=requestPluginStore.registerstill sets thePluginManager(settings name plugins through it), then returns before the catalog fetch and the store's view.tickreturns 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
dlopened: 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
Verified
zig build -Ddynamic-plugins=falseinstalls only the executable, with noplugins/directory.text.dylibplanted 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.zig build,test(91/91 steps),test-integration(53/53 steps),check-tests-reached,test-sdk-version,check-fmt.check-webwith and without the flag.Not exercised: opening Settings in the link-only build. Its plugin rows read through the
PluginManager, which is set as before.Follow-ups
buildAppfallback (a list naming none of fizzy's plugins gets all of them) waits until build: fizzy's plugins are listed; the minimal shape links two example-app#6 is on example-app'smain, because fizzy's CI builds thatmain. It's a small PR after the repin.check-examples.sh, after this merges, for the same ordering reason.🤖 Generated with Claude Code