Documentation
¶
Overview ¶
Package script defines a language-agnostic script execution interface. Implementations (e.g. script/jsrt for JavaScript, script/luart for Lua via gopher-lua) provide concrete runtimes that satisfy the Runtime interface. Host APIs for Env are built with script/bindings; see bindings/doc.go for layout and conventions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Env ¶
type Env struct {
// Config is script-level configuration, accessible as a global in the script.
Config map[string]any
// Bindings maps names to host objects injected into the script's global scope.
// Each value is typically a map[string]any of Go functions callable from the script.
Bindings map[string]any
}
Env carries per-execution configuration and host bindings.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package bindings assembles host capabilities into a script.Env for any script.Runtime implementation (jsrt, luart, etc.).
|
Package bindings assembles host capabilities into a script.Env for any script.Runtime implementation (jsrt, luart, etc.). |
|
Package jsrt provides a goja-based JavaScript implementation of script.Runtime.
|
Package jsrt provides a goja-based JavaScript implementation of script.Runtime. |
|
Package luart provides a pure-Go Lua 5.1 implementation of script.Runtime using github.com/yuin/gopher-lua (no CGO).
|
Package luart provides a pure-Go Lua 5.1 implementation of script.Runtime using github.com/yuin/gopher-lua (no CGO). |
Click to show internal directories.
Click to hide internal directories.