Help us shape the future of Go! Take the 2026 Go Developer Survey

freeze-prelude

command
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Command freeze-prelude regenerates internal/vm/prelude_frozen_gen.go: it compiles the embedded-Ruby prelude (internal/vm/prelude.rb) and writes its bytecode out as a Go literal (embeddedPrelude), so a closed-world binary can load the standard library without linking the front-end.

It finds the module root itself, so both spellings work:

go run ./cmd/freeze-prelude   # from the module root
go generate ./internal/vm     # which runs it FROM internal/vm

That matters because the second is what TestEmbeddedPreludeMatchesSource tells you to run, and with paths taken relative to the working directory it could not work at all: go:generate runs a command in the directory of the file carrying the directive.

TestEmbeddedPreludeMatchesSource fails if the committed file drifts from the prelude source, prompting a regeneration.

Jump to

Keyboard shortcuts

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