GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - fizzyedit/example-plugin: The smallest fizzy plugin: copy it to start your own

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.zig
build.zig
 
 
build.zig.zon
build.zig.zon
 
 
plugin.zig
plugin.zig
 
 
plugin.zig.zon
plugin.zig.zon
 
 

Repository files navigation

example-plugin

The smallest fizzy plugin: one surface in the sidebar that says hello. Copy this repo to start a plugin of your own.

Build and try it

zig build

This builds zig-out/hello.dylib (.so on Linux, .dll on Windows) and installs it into fizzy's plugins directory, <config>/fizzy/plugins/hello/. Start fizzy and "Hello" is in the sidebar.

To keep it out of your own fizzy while you work, point both the build and the fizzy you start at a profile directory of their own (the build honours it from fizzy SDK 0.2.19):

FIZZY_PROFILE=$PWD/.profile zig build
fizzy --profile $PWD/.profile

What is here

File What it is
plugin.zig.zon The plugin's identity: id, name, version, description. Nothing else.
plugin.zig register(host) and the plugin's hooks. What the plugin does is only what it registers here.
build.zig Two lines: fizzy.plugin.create builds the dylib (and exports the source as the "plugin" module, for apps that bundle it), fizzy.plugin.install installs it.
build.zig.zon The package, pinning the fizzy SDK by its release asset.

The full contract (every hook, the lifecycle, settings, documents) is fizzy's docs/PLUGINS.md.

Make it yours

  1. Copy the repo.
  2. In plugin.zig.zon, give it an id of your own, and its name and description. The id is what the store and the plugins directory know it by; keep it short, lowercase, no dots.
  3. In build.zig.zon, rename .name to match, and delete the .fingerprint line. Zig prints a new one on the next build; paste it back in.
  4. In plugin.zig, prefix every id you register with your plugin's id (hello.greeting here).

Publish it

Tag a version and .github/workflows/release.yml builds it for every platform fizzy runs on and attaches the builds and a manifest to the release. The tag must equal version in plugin.zig.zon. To list it in fizzy's plugin store, add it to fizzyedit/plugins.

Staying current

When fizzy releases a new SDK, .github/workflows/sdk-repin.yml builds the plugin against it and opens a pull request moving the pin, when the plugin needs one. Run it by hand from the Actions tab at any time. It needs "Allow GitHub Actions to create and approve pull requests" in the repo's Actions settings.

About

The smallest fizzy plugin: copy it to start your own

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.