Skip to content

Add Zig to ripwire's indexed languages #166

Description

@joyful-ii-V-I

What is missing

ripwire does not index Zig. That leaves TigerBeetle, Ghostty, ZLS and the Zig standard library
outside every verb — and Zig is unusually hard to navigate by grep, because types are const
bindings, generics run at comptime, and files are imported as values. The job is to vendor the
tree-sitter grammar, extract definitions and tests, and disclose what the grammar cannot see.

The evidence

The grammar pins and ABI are already checked, so the risky part of a language round is settled
before anyone starts. tree-sitter-grammars/tree-sitter-zig is MIT-licensed and was verified at two
pins:

  • v1.1.2b670c8df85a1568f498aa5c8cae42f51a90473c0, ABI 14
  • master6479aa13f32f701c383083d8b28360ebd682fb7d, ABI 15

Both sit inside the vendored core's 13–15 window, and neither has an external scanner.

The kit also carries the dialect axis for STEP 0 (which Zig version each corpus targets, and roughly
what changed in 0.15), design notes on @import edges, pub, comptime type constructors,
containers, error sets and test blocks, and the checks added since prompts/add-a-language.md was
written — THIRD_PARTY.md rows, vendorpatchcheck arm H, and the child-walk rule.

Size

Large end to end, but it breaks down:

  • STEP 0 alone (parse rates on a real Zig tree, allowed to say "not yet"): small, and worth
    posting as a draft pull request before any extraction work.
  • Definitions, tests and the red-first gate: medium to large.
  • @import dependency edges: a separate, medium follow-up.

Prerequisites

Reading knowledge of Zig, a C++23 toolchain with CMake, tree-sitter basics (node types and queries),
and a Zig corpus — the standard library, TigerBeetle, Ghostty or ZLS.

Where to start

prompts/help-wanted/zig-language.md is prompts/add-a-language.md specialized for Zig: the
grammar facts above, STEP 0's dialect axis, the design notes, the newer gates, the traps and the
acceptance criteria. Like every prompt in prompts/, it ends by writing a plan and stopping — a
maintainer agrees the plan before any code is written.

Comment here to claim it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions