zig0

my attempts at zig bootstrapping in C
Log | Files | Refs | README | LICENSE

CLAUDE.md (1584B) - Raw


      1 - when porting features from upstream Zig, it should be a mechanical copy.
      2   Don't invent. Most of what you are doing is invented, but needs to be re-done
      3   in C. Keep the structure in place, name functions and types the same way (or
      4   within reason equivalently if there are namespacing constraints). It should
      5   be easy to reference one from the other; and, if there are semantic
      6   differences, they *must* be because Zig or C does not support certain
      7   features (like errdefer).
      8 - See README.md for useful information about this project, incl. how to test
      9   this.
     10 - **Never ever** remove zig-cache, nether local nor global.
     11 - Zig code is in ~/code/zig, don't look at /nix/...
     12 - when translating functions from Zig to C (mechanically, remember?), add them
     13   in the same order as in the original Zig file.
     14 - debug printfs: add printfs only when debugging a specific issue; when done
     15   debugging, remove them (or comment them if you may find them useful later). I
     16   prefer committing code only when `zig build` returns no output.
     17 - Always complete all tasks before stopping. Do not stop to ask for
     18   confirmation mid-task. If you have remaining work, continue without waiting
     19   for input.
     20 - no `cppcheck` suppressions. They are here for a reason. If it is complaining
     21   about automatic variables, make it non-automatic. I.e. find a way to satisfy
     22   the linter, do not suppress it.
     23 - if you are in the middle of porting AstGen, load up the skill
     24   .claude/skills/port-astgen/SKILL.md and proceed with it.
     25 - remember: **mechanical copy** when porting existing stuff, no new creativity.