engines

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2026 License: AGPL-3.0, AGPL-3.0-only Imports: 19 Imported by: 0

Documentation

Overview

Package engines contains all built-in build engines. Import this package to register all engines via their init() functions.

Index

Constants

View Source
const (
	EngineNode    = "binary-node"
	EngineElixir  = "binary-elixir"
	EngineDotnet  = "binary-dotnet"
	EngineC       = "binary-c"
	EnginePython  = "binary-python"
	EngineJVM     = "binary-jvm"
	EngineAndroid = "binary-android"
	EngineCommand = "binary-command"
)

The containerized-build engine runs a build COMMAND inside a declared container IMAGE (repo mounted) and captures the produced artifact — a file OR a directory tree — for languages StageFreight doesn't compile natively. engineNameFor(<b>) resolves to "binary-<b>", so each builder routes here and rides the binary contributor's orchestration + archiving. One engine, one substrate; each language is a small convention (inferBuild) on top. node was first; elixir rides the same rails at a fraction of the cost — which is the whole point.

View Source
const EngineGo = "binary-go"

EngineGo is the engine name for the Go binary builder — the dispatch key the binary contributor resolves for `builder: go`. Sibling language engines register as "binary-<builder>" (e.g. binary-rust), so the contributor stays a generic pipeline that dispatches per builder, with Go as the first implementation.

View Source
const EngineRust = "binary-rust"

EngineRust is the dispatch key for the Rust (cargo) binary engine, sibling to binary-go under the generic binary contributor.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryMeta added in v0.4.0

type BinaryMeta struct {
	From       string            `json:"from"`
	BinaryName string            `json:"binary_name"`
	OutputPath string            `json:"output_path"`
	Args       []string          `json:"args,omitempty"`
	Env        map[string]string `json:"env,omitempty"`
	Compress   bool              `json:"compress"`
}

BinaryMeta is the engine-specific metadata for a binary build step. Attached to UniversalStep.Meta for binary engine steps.

func (BinaryMeta) StepMetaKind added in v0.4.0

func (m BinaryMeta) StepMetaKind() string

StepMetaKind returns the kind identifier for binary build steps.

type ContainerMeta added in v0.7.0

type ContainerMeta struct {
	Image    string            `json:"image"`
	Command  string            `json:"command"`
	WorkDir  string            `json:"work_dir,omitempty"` // relative to repo root
	Env      map[string]string `json:"env,omitempty"`
	Artifact string            `json:"artifact"` // glob (relative to repo root) of produced file(s)
	// ForwardEnv names host env vars (e.g. CI secrets) to pass into the build
	// container by value — used for signing secrets like an Android keystore.
	ForwardEnv []string `json:"forward_env,omitempty"`
}

ContainerMeta is the engine-specific metadata for a containerized build step: run Command inside Image with the repo mounted, then collect Artifact (a glob of the produced file(s)). Attached to UniversalStep.Meta for the node engine.

func (ContainerMeta) StepMetaKind added in v0.7.0

func (m ContainerMeta) StepMetaKind() string

StepMetaKind returns the kind identifier for containerized build steps.

type RustMeta added in v0.7.0

type RustMeta struct {
	ManifestDir string            `json:"manifest_dir"` // dir containing Cargo.toml
	BinName     string            `json:"bin_name"`     // crate [[bin]]/package name → cargo --bin
	OutputPath  string            `json:"output_path"`  // canonical DistDir output path
	Release     bool              `json:"release"`
	Args        []string          `json:"args,omitempty"`
	Env         map[string]string `json:"env,omitempty"`
}

RustMeta is the engine-specific metadata for a Rust (cargo) binary build step — the Rust analog of BinaryMeta. Attached to UniversalStep.Meta for binary-rust steps.

func (RustMeta) StepMetaKind added in v0.7.0

func (m RustMeta) StepMetaKind() string

StepMetaKind returns the kind identifier for Rust build steps.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL