compile

package
v0.159.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package compile compiles FTL Go module source into a deployable executable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build added in v0.96.0

func Build(ctx context.Context, moduleDir string, sch *schema.Schema) error

Build the given module.

func GenerateStubsForExternalLibrary added in v0.155.0

func GenerateStubsForExternalLibrary(ctx context.Context, dir string, schema *schema.Schema) error

Types

type Error added in v0.146.1

type Error struct {
	Msg string
	Pos schema.Position
	Err error // Wrapped error, if any
}

func (Error) Error added in v0.146.1

func (e Error) Error() string

func (Error) Unwrap added in v0.146.1

func (e Error) Unwrap() error

type ExternalModuleContext added in v0.155.0

type ExternalModuleContext struct {
	ModuleDir string
	*schema.Schema
	GoVersion    string
	FTLVersion   string
	Main         string
	Replacements []*modfile.Replace
}

func (ExternalModuleContext) NonMainModules added in v0.155.0

func (b ExternalModuleContext) NonMainModules() []*schema.Module

type NativeNames added in v0.119.1

type NativeNames map[schema.Decl]string

NativeNames is a map of top-level declarations to their native Go names.

func ExtractModuleSchema

func ExtractModuleSchema(dir string) (NativeNames, *schema.Module, error)

ExtractModuleSchema statically parses Go FTL module source into a schema.Module.

Jump to

Keyboard shortcuts

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