rustbuild

package
v1.58.9 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CargoLock sync.Mutex

CargoLock prevents multiple concurrent cargo executions.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Executable bool
	Name       string
	Path       FSPath
}

type CompileInput

type CompileInput struct {
	// Where the source code is located.
	PackageRoot FSPath

	// The cargo 'target' directory to use for compiled outputs.
	CargoTargetDir FSPath

	// True if it should be built with `--release`.
	ReleaseBuild bool

	ArtifactName    string
	CargoTarget     string
	UseZig          bool
	ZigGlibcVersion string
	ExtraEnvs       []string
}

type CompileOutput

type CompileOutput struct {
	// Path to the built artifact.
	Artifact FSPath
}

func Compile

func Compile(ctx context.Context, in CompileInput) (*CompileOutput, error)

Compile compiles a rust program.

Jump to

Keyboard shortcuts

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