ltabis / rhai-autodocs

Generate Markdown documentation from a `rhai::Engine` instance.
MIT License
3 stars 1 forks source link

Is this usable? #1

Closed schungx closed 1 year ago

schungx commented 1 year ago

I am wondering if this is usable?

ltabis commented 1 year ago

Yes it s @schungx, however it severely lacks a proper API and documentation, so I would not recommend using it right now :)

ltabis commented 1 year ago

i.e. the generated markdown outputs a bit of html code with spcific css classes that I use in my own projects, it would break if used without any css ... I have a good amount of stuff to do to make it usable :)

ltabis commented 1 year ago

Would you like to see any specific feature for this crate btw ? (Also, here is an example of what this crate can generate: https://vsmtp.rs/next/ref/vSL/api/fn::global::transport.html)

schungx commented 1 year ago

There have been a number of requests for a tool to make documentation out of registered Rust API from an Engine, so something like this is perfect.

I suppose this can start as a stand-alone CLI tool and we can then add more features/flags as needed.

A good idea may be to parallel some of the settings of rhai-doc (e.g. specifying output directory) so that they are more consistent with each other.

schungx commented 1 year ago

For example:

https://github.com/makspll/bevy_mod_scripting#teal---lua-static-typing

This says Lua has Teal which is a documentation tool to generate API docs.

ltabis commented 1 year ago

Why not ! Teal looks like a good inspiration to get started

ltabis commented 1 year ago

However I'm not sure how to make a CLI while being able to let the user define an engine with the API that he wants to document. I'll have to look into that

schungx commented 1 year ago

However I'm not sure how to make a CLI while being able to let the user define an engine with the API that he wants to document. I'll have to look into that

That's a good point... so technically it must be a crate that is pulled in by the user...

ltabis commented 1 year ago

That's a good point... so technically it must be a crate that is pulled in by the user...

Yup, that is what I was going for.

schungx commented 1 year ago

Just a prompt to see the progress on this... potentially very useful tool!

ltabis commented 1 year ago

Hey @schungx, sorry for the delay

I've added documentation on the css part of the generated documentation and an additional mdbook example, so I think it is safe to use now !

I also released version 0.1.4 of the crate, which enables you to see rust doc sections using tabs. https://github.com/ltabis/rhai-autodocs/releases/tag/v0.1.4

ltabis commented 1 year ago

I'm closing this ;)

schungx commented 1 year ago

When do you think this is ready to move into the official rhaiscript org?