Files
zig/CLAUDE.md
2026-02-12 08:16:50 +02:00

21 lines
1.2 KiB
Markdown

- when porting features from upstream Zig, it should be a mechanical copy.
Don't invent. Most of what you are doing is invented, but needs to be re-done
in C. Keep the structure in place, name functions and types the same way (or
within reason equivalently if there are namespacing constraints). It should
be easy to reference one from the other; and, if there are semantic
differences, they *must* be because Zig or C does not support certain
features (like errdefer).
- See README.md for useful information about this project, incl. how to test
this.
- **Never ever** remove zig-cache, nether local nor global.
- Zig code is in ~/code/zig, don't look at /nix/...
- when translating functions from Zig to C (mechanically, remember?), add them
in the same order as in the original Zig file.
- debug printfs: add printfs only when debugging a specific issue; when done
debugging, remove them (or comment them if you may find them useful later). I
prefer committing code only when `zig build` returns no output.
- Always complete all tasks before stopping. Do not stop to ask for
confirmation mid-task. If you have remaining work, continue without waiting
for input.
- remember: **mechanical copy** when porting existing stuff, no new creativity.