gen_subset_blob_embeds

command
v0.20.2 Latest Latest
Warning

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

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

Documentation

Overview

Command gen_subset_blob_embeds generates the per-language z_subset_blob_embed_<lang>.go files that power embedded grammar_subset builds (issue #88: per-language compile-time grammar selection).

Each generated file embeds exactly one grammar blob behind the `grammar_subset_<lang>` build tag and registers it with the subset blob source (blob_source_subset_embedded.go). Building with, e.g.,

go build -tags 'grammar_subset grammar_subset_go grammar_subset_python'

then embeds only go.bin + python.bin into the binary instead of all ~206 blobs — the whole point of the feature.

The generated set must stay in sync with grammars/grammar_blobs/*.bin. Run from the repo root after adding/removing a grammar blob:

go run ./cmd/gen_subset_blob_embeds

Jump to

Keyboard shortcuts

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