I have been looking for such a solution as well.

For now in Arraymancer I call nim doc on each individual files. It works 
because I've separated public/private API and a file containing public API does 
not export any "private" proc.

See doc generator: 
[https://github.com/mratsim/Arraymancer/blob/0d57199c/docs/docs.nim](https://github.com/mratsim/Arraymancer/blob/0d57199c/docs/docs.nim)
 and thanks @Vindaar for the contribution. In the past I hacked together a very 
flaky .nimble (probably my worse piece of code by a long mile (copy-pasta soup 
after fighting with documentation for hours): 
[https://github.com/mratsim/Arraymancer/blob/a0bdf4ec/arraymancer.nimble#L232-L316](https://github.com/mratsim/Arraymancer/blob/a0bdf4ec/arraymancer.nimble#L232-L316)

Right now with Weave I'm exploring using 
[mdBook](https://rust-lang.github.io/mdBook/), the Rust doc generator, to 
generate the prose 
[https://github.com/mratsim/weave/tree/2e528bd2/docs](https://github.com/mratsim/weave/tree/2e528bd2/docs)

However I'm lacking tooling/documentation to automatically export all public 
proc into a JSON API. AFAIK the docgen gained a lot of options since I 
struggled with it in Arraymancer, --projects flags and such but some are 
ironically not reflected in the documentation.

Reply via email to