LOC in Zig

Hi guys,

After familiar with Zig’ syntax in a couple of weeks, I try implementing LOC in Zig.

It’s my first non-trivial Zig project, I try hard to follow Zig idioms I learnt in ziglearn & zig.news.

Feel free to ask questions or give me some reviews. Really appreciate it

Happy Hacking Zig!

4 Likes

This is great. And it’s very fast! It took me a moment to realize I needed to import the table-helper Git submodule. But after that, it was no problem. Nice project!

Thanks,

I will mention this in README

Not for big project, I plan to add threads support, which is tracked in Performance compared with cgag/loc · Issue #1 · jiacai2050/zigcli · GitHub

1 Like

After this, loc get 2x speedup.