runtime

package
v0.11.18 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRuntime

func NewRuntime(ctx context.Context, opts Options) (*gojengine.Runtime, error)

NewRuntime creates a new owned JS runtime that exposes require("geppetto").

Types

type Options

type Options struct {
	// ModuleOptions are forwarded to geppetto.Register. Runner is always bound
	// to the created runtime owner.
	ModuleOptions gp.Options

	// RequireOptions are applied to the runtime's module registry.
	RequireOptions []require.Option

	// IncludeDefaultModules enables go-go-goja default native modules in
	// addition to geppetto.
	IncludeDefaultModules bool

	// RuntimeInitializers are executed after require/geppetto registration.
	RuntimeInitializers []gojengine.RuntimeInitializer
}

Options configure a geppetto JavaScript runtime bootstrapped on top of the go-go-goja owned runtime builder.

Jump to

Keyboard shortcuts

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