-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
possible to use for generating documentation of registered rust functions? #5
Comments
I have thought of this before and wanted essentially the same thing. However, All the mechanisms are already there: You can easily get a JSON file of all the registered functions in one single call. https://rhai.rs/book/engine/metadata/export_to_json.html All you need to do is a templating system (e.g. handlebars) that takes this JSON file and generates documentation pages. In fact, you'd probably want to first use a templating system to generate a MarkDown file containing the functions plus doc-comments (in MarkDown), then convert that MarkDown into HTML. |
cool - I will have a look! thanks. |
It seems like you can use a static site generator which supports JSON sources to automatically generate documentation pages. Something like Hugo: https://gohugo.io/templates/data-templates/ Or, it probably won't be difficult to write your own using |
@schungx This is probably something that should be supported but this currently only parses |
There is already a way to generate similar documentation on native Rust functions into a JSON format. It would be more in-depth than the current Rhai functions because you have to deal with parameter types, return types and Nevertheless, the logic is similar to |
I don't think this is possible with rhai-doc as is but wanted to double check. in my case I have a fairly large api of registered rust types/functions that I would love to generate docs for.
The text was updated successfully, but these errors were encountered: