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
Click to show internal directories.
Click to hide internal directories.