generator

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildGoFile deprecated

func BuildGoFile(sourcePath string) error

Deprecated: BuildGoFile is kept for backward compatibility. Use BuildFromCode instead.

func Generate

func Generate(wfs []workflow.Workflow) (string, error)

Generate builds a single Go program that runs one or more workflows in parallel. Workflows may coordinate via step-level `wait_for` values that reference `workflowName.stepName` keys.

func SaveToFile

func SaveToFile(path string, code string) error

SaveToFile writes generated code to a file (for --keep-source or debugging).

Types

type BuildOptions added in v0.2.0

type BuildOptions struct {
	// OutputDir is where the final binary will be placed.
	OutputDir string

	// OutputName is the name of the binary (without extension).
	OutputName string

	// KeepSource keeps the generated .go file for debugging.
	// If false (default), the source is deleted after build.
	KeepSource bool

	// SourceDir overrides where to save the source file when KeepSource is true.
	// Defaults to OutputDir.
	SourceDir string
}

BuildOptions configures the build process.

type BuildResult added in v0.2.0

type BuildResult struct {
	// BinaryPath is the path to the compiled binary.
	BinaryPath string

	// SourcePath is the path to the generated source (only if KeepSource was true).
	SourcePath string
}

BuildResult contains the paths to generated artifacts.

func BuildFromCode added in v0.2.0

func BuildFromCode(code string, opts *BuildOptions) (*BuildResult, error)

BuildFromCode compiles generated Go code into a standalone binary. The code is compiled within the llm-compiler module context, allowing direct import of internal packages.

Jump to

Keyboard shortcuts

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