gobindings

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package gobindings generates Go bindings for a GX package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(pkg *ir.Package) (bindings.Binder, error)

New returns a new Go bindings generator.

func NewWithImporter added in v0.4.0

func NewWithImporter(importer DependenciesBuildCall, pkg *ir.Package) (bindings.Binder, error)

NewWithImporter returns a new Go bindings generator given a way to import GX packages.

func Write added in v0.4.0

func Write(w io.Writer, pkg *ir.Package) error

Write writes Go bindings directly to a writer.

Types

type DependenciesBuildCall

type DependenciesBuildCall interface {
	// SourceImport generates the import when the GX source needs to be imported
	// from a Go module.
	SourceImport(*ir.Package) string

	// DependencyImport generates the import to insert in the package source code.
	DependencyImport(*ir.Package) string

	// StdlibDependencyImport returns the package path to a dependency on
	// the standard library package.
	StdlibDependencyImport(string) string
}

DependenciesBuildCall generates the source code to get the GX package in GX intermediate representation (IR).

Directories

Path Synopsis
Package types defines types used in the Go bindings.
Package types defines types used in the Go bindings.

Jump to

Keyboard shortcuts

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