embed

command
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Example: embedding the mvm interpreter in a host Go program.

It shows how to:

  • construct an interpreter for the Go language spec
  • expose custom host functions and values to interpreted code
  • import the bundled stdlib bindings so packages like "fmt" work
  • evaluate a snippet and read its result back into Go

Run from the repo root:

go run ./examples/embed

Jump to

Keyboard shortcuts

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