emit

package
v0.0.0-...-0733c9a Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package emit translates go/ssa into C11 source files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Emitter

type Emitter struct {
	// contains filtered or unexported fields
}

Emitter holds state for emitting one Go package as C.

func New

func New(prog *frontend.Program) *Emitter

New creates an Emitter for the given loaded program.

func (*Emitter) EmitAll

func (e *Emitter) EmitAll(outDir string) error

EmitAll emits all packages to .h + .c files in outDir. It also copies the runtime header and implementation.

func (*Emitter) EmitPkg

func (e *Emitter) EmitPkg(pkg *ssa.Package, w io.Writer) error

EmitPkg emits a single package to a writer (for testing / inspection).

Jump to

Keyboard shortcuts

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