build

package
v1.234.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package build compiles native Go plugins using the shared process runner.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(ctx context.Context, directory string, options ...Option) (string, error)

Compile builds one plugin and returns its executable after atomic replacement. Use CompileAll when requesting multiple declared targets.

func CompileAll

func CompileAll(ctx context.Context, directory string, options ...Option) ([]string, error)

CompileAll builds the selected targets without executing them. All targets and destinations are validated first. On failure it returns completed paths; each completed binary remains available and the failed target's old binary survives.

func Run

func Run(ctx context.Context, directory string, options ...Option) error

Run compiles the package into its current-platform executable. A failed build leaves the previous executable intact, and a successful build never installs it.

Types

type Option

type Option func(*settings)

Option configures build execution without changing the package manifest.

func WithAllPlatforms

func WithAllPlatforms(value bool) Option

WithAllPlatforms builds every declared platform with bounded concurrency.

func WithPlatform

func WithPlatform(value string) Option

WithPlatform selects an explicitly declared OS/architecture[/variant] build target.

func WithRunner

func WithRunner(runner process.Runner) Option

WithRunner selects the subprocess implementation.

func WithStreams

func WithStreams(streams process.Streams) Option

WithStreams connects compiler output to the caller's streams.

Jump to

Keyboard shortcuts

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