How to open and read a file in zig?

Oh, yes, and this. It does look like you’re using master (0.16), right? In this case, I think you’ll find a lot of various “how-to” documentation out there that references the old fs.File stuff which will soon be deprecated - later, you use std.fs.File.stdout(), but that’s for your stdout, so that’s probably fine. Just beware that if you’re in this 0.16-forward space, then fs.File will be deprecated to io.File. Refer to the official zig documentation, which does spell out quite a lot of the Io stuff, even if verbosity might grow in time.