Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ratfactor/stdlib-docgen
Zig Standard Library document generator
https://github.com/ratfactor/stdlib-docgen
Last synced: 3 months ago
JSON representation
Zig Standard Library document generator
- Host: GitHub
- URL: https://github.com/ratfactor/stdlib-docgen
- Owner: ratfactor
- License: mit
- Created: 2021-05-18T15:23:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-05-26T01:32:19.000Z (over 3 years ago)
- Last Synced: 2023-03-22T17:50:29.551Z (almost 2 years ago)
- Language: HTML
- Size: 116 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= Zig Standard Library Doc Generator
**MOVED!** Hello, I am moving my repos to http://ratfactor.com/repos/
and setting them to read-only ("archived") on GitHub. Thank you, _-Dave_Generates a single-page "map" of the functions and types available in the
Zig stdlib.== Based on g-w1's zigdoc
First of all, this only exists because https://g-w1.github.io/[g-w1] created
https://github.com/g-w1/zigdoc[zigdoc].
I shamelessly copied zigdoc and pared it down to produce the output I wanted.
If you want multi-page Zig stdlib docs with HTML or JSON output and full
function signatures (and even whole functions if they're 3 lines or less), then
go take a look at zigdoc!== What
The idea is to make it easy to do an in-page browser search for the feature you
want and then have a handy link to view the source, where you can learn more
about the usage or implementation of the feature.Latest export from this tool (and currently quite horrendous) can be viewed here:
http://ratfactor.com/zig/stdlib/
== Usage
----
$ zig build-exe gen.zig
$ ./gen /path/to/zig/lib/std/
----Output is a single `index.html`.
If you would like to change any settings, edit `gen.zig`.
== TODO
* Sort source files
* How to handle little stubby helper files that don't do much on their own?
* Sort decls by type then name
* Summarize but don't show all billion values in some of the modules (index.html
started at 13Mb and I've got it down to 4Mb, but there's still too much)
* Make functions more obvious (just add `()`?)
* Clever way to add descriptions - don't really want to create a separate
text file for _each_ module file, but that might be the best way to do it