u/NicBarr

▲ 16 r/Zig

How to get a file's content in zig 0.17.0?

i've just started using zig about 3 days ago. i'm trying to build a little program for practice. the program should take in a filename as a command line argument, then read the contents of that file and count how many words there are.

but i cannot figure out for the life of me how to read the contents of a file. all the information i'm seeing online seems to be wrong and outdated.

i'm completely new to low level programming so this has been pretty daunting. i thought this should be a pretty simple task.

reddit.com
u/NicBarr — 1 day ago
▲ 14 r/Zig

Notifications/progress bar disable

I have this really annoying series of problems that stem from the fact the zig compiler has a progress animation and sends out progress notifications.

is it possible to disable it? i looked for a flag to use with zig build or zig run that would remove the progress bar or notifications and i couldn't find one.

reddit.com
u/NicBarr — 3 days ago