Documentation
¶
Overview ¶
Package starkvm wraps Google's go.starlark.net Starlark interpreter as an extruntime.Runtime. Starlark is Python-syntax-with-strict- semantics — pure functions, no while loops, no recursion (configurable), designed by Google for embedding configuration/policy code into Go. Used by Bazel, Buck2, Tilt, Pulumi, Drone CI.
Use this when:
- You want users to write Python-feel extension hooks but you don't need the full Python ecosystem (numpy, requests, etc).
- You want hermetic-by-construction semantics (no IO, no time, no network unless you wire it in via the host).
- You want pure-Go (no cgo, no libpython) parallelism without a GIL.
Per the architecture brief: AcceptsLanguages=["starlark"], HardSandbox is false (Starlark values live on the Go heap; a malicious script could exhaust memory with deep nesting / large list comprehensions), Cgo=false, SupportsAbort=true (starlark.Thread.Cancel is honored on the next opcode, comparable to goja.Interrupt — cooperative but reliably prompt for any real-world script).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRuntime ¶
func NewRuntime() extruntime.Runtime
NewRuntime constructs a starlark-backed extruntime.Runtime. The pool size is shared across modules — each module owns its own thread pool because threads carry a global frame reference.
Types ¶
This section is empty.