redhat-et / redhat-et/ripwire

Add Zig to ripwire's indexed languages

Open
#166 0 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
C++
Stars
2.1k
Forks
125
Avg merge
5h 42m
Merged PRs (30d)
136

Description

## 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.2` → `b670c8df85a1568f498aa5c8cae42f51a90473c0`, **ABI 14**
- `master` → `6479aa13f32f701c383083d8b28360ebd682fb7d`, **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.

Contributor guide

Open the contributing guide

Research direction

Read prompts/help-wanted/zig-language.md first, including its dialect axis, design notes, traps, newer gates, and acceptance criteria. Begin with STEP 0 by measuring parse rates on a real Zig corpus and writing the requested plan; stop for maintainer agreement before implementing extraction, tests, or import edges. Done for this stage is a draft pull request with the plan and parse-rate evidence.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, zig
Domain
cli, compilers, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.