code-yeongyu / code-yeongyu/c11-compiler-zig-omo

[Sisyphus] Roadmap — c11-compiler-zig-omo (master tracker)

Open
#1 18 comments 0 reactions 0 assignees View on GitHub
docs phase-0
Dominant language
C
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

{[Sisyphus]} Master roadmap for the c11-compiler-zig-omo project.

This issue is the single source of truth for phase progress. Sub-issues hang off here. The team operates per [`docs/team/charter.md`](https://github.com/code-yeongyu/c11-compiler-zig-omo/blob/master/docs/team/charter.md).

---

## Phases

### Phase 0 — Infrastructure ✅ in progress
- [x] Install zig 0.16.0, gdb 17.1, ghidra 12.0.4, pull gcc:13 + gcc:14 docker images
- [x] Create labels, milestones
- [x] Write CI workflows (phase-1-c, phase-2-zig, phase-3-verify)
- [x] Team charter + ADR-0001 toolchain matrix
- [ ] Commit + push + protect master via process discipline

### Phase 1 — Reference C code
Deliverables:
- [ ] **DOOM** port building with `gcc` and `clang`, native + Linux-in-docker. Hands-on QA in interactive terminal.
- [ ] **HTTP/2 server** (h2c) with kqueue (macOS) / epoll / io_uring (Linux), auto-detected at build, plus a smoke + integration test.
- [ ] **C11 reference suite** exercising atomics, _Generic, alignas, threads.h, designated initializers, anonymous unions, _Static_assert, hex floats, u8 strings, complex.h.

Sub-issues are created and linked below.

### Phase 2 — Zig C11 compiler (`zcc`)
Deliverables:
- [ ] Lexer (multi-byte strings, digraphs, raw character set, hex/binary literals, complex literals).
- [ ] Parser → AST.
- [ ] Semantic analysis: scopes, types, integer promotion, _Generic resolution, _Atomic, _Thread_local.
- [ ] IR (SSA-style).
- [ ] Codegen for x86_64 (System V) and arm64 (Mach-O AAPCS64).
- [ ] Driver: parses cc-style flags, parallel multi-TU compile via `Thread.Pool` + multi-process for sandboxing.
- [ ] Tests: hermetic, given/when/then style, full-flow + unit.

### Phase 3 — Verification
Deliverables:
- [ ] zcc-vs-gcc differential harness (`-O0` and optimized).
- [ ] gdb scripted harness running compiled binaries inside docker.
- [ ] Ghidra headless harness comparing decompilation of zcc vs gcc.
- [ ] Cross-compile harness (x86_64 ↔ arm64, macOS ↔ linux).
- [ ] All Phase-1 binaries pass.

---

## Phase gates

| Phase | Done when |
|---|---|
| 0 | All infra committed; CI definitions present |
| 1 | All three deliverables build & QA'd interactively, signed off by an `ultrabrain` and an `unspecified-high` reviewer |
| 2 | `zcc` self-tests pass on macOS + linux; differential to gcc on a small suite is green; both reviewers signed off |
| 3 | Phase-1 code, plus C11 edge cases, all compile with `zcc` and run identically to the gcc baseline at `-O0` and optimized; gdb + Ghidra walks succeed; both reviewers signed off |

---

## Conventions reminder

- Every issue/PR/comment **must** start with `{[NAME]}` or `[NAME]`.
- Status comments use the `Done / To Do / Blockers` format.
- PRs must be locally pulled, run, and reviewed by **both** an `ultrabrain` and an `unspecified-high` reviewer before merge.
- Test discipline: given/when/then, no mocks unless physically unavoidable, both unit + E2E.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with docs/team/charter.md and the phase checklists in this tracker. There is no single entry point or test named for this master issue; completion requires all Phase 0–3 deliverables and the listed phase gates, including C11 reference builds, zcc verification, and reviewer sign-off.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, docker, linux, zig
Domain
build-system, compilers, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.