Skip to main content
Version: 0.15.1

Handing it on

A Plugin is published as its source, at a tag. Whoever uses it — your own application, somebody else's, a device's image — builds it for their own architecture and takes two files from it: its executable and its Manifest. Those two are what an application holds, and nothing else of the source travels with it.

greeter the executable, for one architecture
com.example.greeter.yaml the Manifest, kept in the source and printed by that executable

Publish it​

Put the Plugin project in a repository of its own, and tag it vX.Y.Z. The tag is the version: yoke-plugin.yaml states none, and a tag that is not a semantic version is refused by whoever takes it.

git init && git add . && git commit -m "The greeter"
git tag v0.1.0
git remote add origin https://github.com/you/greeter && git push origin HEAD v0.1.0

An application takes it by the repository and the tag, and the composer resolves the tag to its commit, builds it there, and records both:

yoke-compose add plugin https://github.com/you/greeter@v0.1.0

Taking a Plugin runs its author's build, so the composer shows the source, the commit and the command before it runs it, and asks (taking the Plugins). A newer tag is taken with yoke-compose update plugin com.example.greeter --to v0.2.0, and yoke-compose plugins says, for each Plugin taken, whether its tag still names the commit it was taken at.

An executable offered beside the source is a convenience, never the Plugin. Nothing in Yoke reads one, and there is no index to register a Plugin in: the repository and its tags are the whole of the publication. try/ is not published as part of the Plugin: it travels in the repository, and no application that takes the Plugin takes it.

What stays the same, and what changes​

The identity is kept for as long as the program is the same Plugin. The operator's grants, and every application that runs it, name it by com.example.greeter; a new identity is a new Plugin, which starts with nothing granted.

A Manifest has no version, and a build is known by its executable's digest. An application pins the digest of the executable it carries, so a new build of the Plugin reaches an application only when that application takes it and pins it again.

A capability's name keeps its meaning. It appears in three places at once: the Manifest the author writes, the grants the operator keeps, and the check the Core makes. Changing what an unchanged name means would silently change every grant made under it, so a new meaning takes a new name. A capability dropped from a later build leaves its grant inert: nothing declares it, and nothing is granted by it (capabilities).

Where each form takes it​

The two files are the same in both forms of an application; only who puts them where differs (where a Plugin goes).

Taken intoThe executableThe ManifestWho puts them there
an application's packagecomponents/ of the project, pinned by its digest in yoke.yamlmanifests/com.example.greeter.yamlthe application's author, with yoke-compose (the project)
the service form/usr/lib/yoke/plugins/com.example.greeter/etc/yoke/plugins.d/com.example.greeter/manifest.yamlthe distribution's package of the Plugin, or the recipe that builds it into an image (the layer)

In the application form a Plugin can also run in a container, when the author hands on an image instead of an executable. The Manifest is the same file, and the application names the image by its digest. The service form runs its Plugins on the host (what changes in a container).

What the executable needs on the host​

An application is built for one architecture, and every executable it carries is built for that one. A Plugin meant for several is built once per architecture. Beyond that, each language leaves a different amount to the host:

Nothing. Built with CGO_ENABLED=0, the executable is linked statically and runs on any Linux host of its architecture.

A Plugin is used by applications, and writing one is the next section. Building an application puts Plugins that already exist together, and starts from the two files this page ends with.