Skip to main content

Plugins

Almost everything heph can do comes from plugins. A plugin is either a driver — a named executor a target references via its driver field — or a provider — it discovers or generates targets. 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.