code-yeongyu / code-yeongyu/c11-compiler-zig-omo
[Sisyphus] phase-2 / zcc / Wave 0 — Scaffold (build.zig + driver entry)
- Dominant language
- C
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Scope
Deliver the initial Zig build system and CLI driver entry point for the `zcc` C11 compiler.
## Deliverables
- `phase2/zcc/build.zig` — Zig 0.16 build script, zero external dependencies, produces `zcc` executable.
- `phase2/zcc/src/main.zig` — CLI driver entry point.
- `phase2/zcc/src/cli.zig` — basic CLI argument parsing (`--help`, `-E`, `-o`, `-c`, `-O0`/`-O2`, `-g`, `-fsanitize=...`).
## Success Criteria
1. `zig build` completes without errors on macOS and inside a Linux Docker container.
2. `./zig-out/bin/zcc --help` prints usage and exits 0.
3. `zcc -E foo.c` runs the preprocessor-only stub (lexes and prints tokens to stdout, no codegen).
4. No external Zig package dependencies; only stdlib.
## Dependencies on Prior Waves
- None (Wave 0 is the root).
## Suggested Role Assignment
`scaffold-engineer`
## Test Corpus Expectations
- Unit test: `zig build test` runs `cli.zig` tests (argument parsing edge cases).
- Integration: `zcc --help` and `zcc -E` on a trivial `hello.c` in CI.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the deliverables in phase2/zcc/build.zig, src/main.zig, and src/cli.zig, then review the existing repository layout and Zig version requirements. Run zig build and zig build test before implementing the scaffold. Done means the executable builds on macOS and Linux, --help succeeds, -E processes a trivial hello.c, and CLI tests cover the listed options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, zig
- Domain
- build-system, cli, compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100