Zig Documentation - with zig std

As someone who’s internet is limited by their mobile data hotspot, I love that I can type ‘zig std’ and have it generate a local version of the docs to sort through without an internet connection. I was recently looking at the zig docs themselves and was wondering why they’re not included in that offline documentation?

I know technically it’s language docs and not the standard library, though without a good grasp on the language itself reading the std docs can become a bit challenging. Especially when you bring in ideas from other languages that don’t quite translate over.

1 Like

Did you mean to post this link, for std documentation?

(EDIT: these links are for 0.15.2, by the way.)

EDIT 2 - sorry, misinterpreted reference to std; I see OPs link is what they meant.)

No, they’re talking about the language reference, not std docs. The link they posted is correct.

The question is why aren’t the language docs available and easily served via the CLI? Compared to the std documentation, which is available with the zig std command.

It is included with the binary distributions in path doc/langref.html

7 Likes

Thank you, I didn’t know that it was included in the binary distribution. Since I use zvm to manage zig. So I’ve never actually seen what the extraction looks like.

Though it would be nice to have a ‘zig langref’ to mirror ‘zig std’ that opens it in a browser. Especially if they’re already shipping it with the binary.

3 Likes