compiler

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Overview

Package compiler provides the core compilation logic for llm-compiler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// OutputDir is the directory where the binary will be placed.
	OutputDir string

	// OutputName overrides the output binary name.
	// If empty, uses the input filename (without extension).
	OutputName string

	// SkipBuild generates the Go code but skips compilation.
	// Use with KeepSource to inspect generated code.
	SkipBuild bool

	// KeepSource saves the generated .go file alongside the binary.
	// Useful for debugging or inspection.
	KeepSource bool

	// Verbose enables detailed output during compilation.
	Verbose bool
}

Options configures the compilation process.

type Result

type Result struct {
	// SourceFile is the path to the generated Go source file.
	// Only set if KeepSource was true or SkipBuild was true.
	SourceFile string

	// BinaryFile is the path to the compiled binary.
	// Empty if SkipBuild was true.
	BinaryFile string

	// Workflows contains the parsed workflow definitions.
	Workflows []workflow.Workflow
}

Result contains the results of a successful compilation.

func Compile

func Compile(wfs []workflow.Workflow, opts *Options) (*Result, error)

Compile compiles workflow structs into a standalone binary.

func CompileFile

func CompileFile(inputPath string, opts *Options) (*Result, error)

CompileFile compiles a YAML workflow file into a standalone binary.

Jump to

Keyboard shortcuts

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