Skip to main content

Plugins

Almost everything heph can do comes from plugins. Plugins come in three kinds: a driver is a named executor a target references via its driver field; a provider discovers or generates targets; a hook observes the engine's build-event stream without producing or running anything. For example, when you write driver = "bash" in a BUILD file, you are reaching for a driver registered by the Exec plugin; when heph scans the workspace for BUILD files, that is a provider at work.

Drivers

Each driver plugin registers one or more named executors a target can run through.

PluginDriverPurpose
Execexec, bash, shRuns shell commands in sandboxed builds, with interactive debugging.
FilesystemfsReferences workspace files and globs as build inputs.
GroupgroupBundles targets transparently with no extra work.
HostbinhostbinWraps host PATH binaries as targets for the build system.
NixnixBuilds reproducible tool environments via Nix flakes.
TextfiletextfileGenerates text files with optional executable permissions.

Languages

Language plugins add first-class support for a toolchain, registering the drivers that build its libraries, binaries, and tests.

PluginDriverPurpose
Gogo_golist, go_embed, go_testmainGo language support: libraries, binaries, tests.

Providers

Each provider plugin discovers or generates targets rather than executing them, so it registers no driver.

PluginPurpose
BuildfileScans the workspace for BUILD files and parses target definitions.
QuerySelects targets dynamically by label, package, prefix, or output.

Hooks

Hook plugins observe the engine's BuildEvent stream — targets matched, started, finished, cache hits, failures — without producing or running targets. They are purely build-event consumers and run in the same process as heph on a background thread.

PluginPurpose
GitHub ActionsLive PR comment and step summary for GitHub Actions builds.