generator

package
v0.5.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SupportPackageDir

func SupportPackageDir(resolved config.Resolved) string

SupportPackageDir is where the support package is written for a resolved configuration: `internal/fgb` next to the generated Go bridge.

func WriteSupportPackage

func WriteSupportPackage(resolved config.Resolved) (string, error)

WriteSupportPackage emits the support package. It must run before the Go input is parsed: an API that references the package cannot even be loaded until the package exists on disk. The content is static, so this is safe to do up front, and rewriting it on every run keeps it in lockstep with the generated bridge - the two share an internal contract.

Types

type Result

type Result struct {
	Files            []string
	Warnings         []error
	DartDependencies []string
}

func Generate

func Generate(api *model.API, resolved config.Resolved) (Result, error)

func GenerateAll

func GenerateAll(api *model.API, resolved config.Resolved) (Result, error)

GenerateAll emits both platform implementations and the conditional Dart facades that select Native or Web at compile time. The existing Generate function remains the single-target renderer used by focused generator tests and by callers that intentionally need one platform only.

Directories

Path Synopsis
Package fgb holds the types that must appear in the signatures of a Go API bridged to Dart.
Package fgb holds the types that must appear in the signatures of a Go API bridged to Dart.

Jump to

Keyboard shortcuts

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