-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate documentation from doc comments #178
Comments
This would be the way to go. We could start simple, even supporting formats like If I remember correctly, |
Yeah converting basic markdown isnt that hard, it just takes a couple regexes. The annotations and such would be slightly more difficult, iirc rust doc uses |
Oh nice! One thing to keep in mind is that proc-macros are a heavy burden on compile time, and regex replacement can be relatively expensive, especially if it's done "poorly" (i.e. each regex match replaces the entire doc-string, causing new allocations and copying). Likely not an issue for small games, this could affect someone with a larger number of documented classes/methods/properties. Would need to be measured though. |
Just in case if things slow down, at least it should be (default) disabled in debug build. My reasoning is that docs isn't very useful in prototyping stage, and if one wants to release their addons/games it's nice to have docs for end user. |
We do that in gdnative for |
we could maybe use https://crates.io/crates/rustdoc-json for help with parsing the docs similar to rustdoc, however it does rely on the currently unstable rustdoc JSON backend. |
there isn't a way to do this yet in gdextension, there is a draft PR for it though godotengine/godot#75415 |
Passing new PR in this topi, as it seems to be accepted and basically stopped only from 4.2 only because it was in feature-freeze. Most probably it will come in 4.3 release, so we could begin to prepare for it. |
The PR StatisMike mentioned is merged, so this issue should be unblocked now |
gdscript now has doccomments, so it would be neat, if, say
would then generate documentation that you can view in the editor:
or you could even take it a step further, and convert markdown into bbcode so that it meshes better with the rust system.
The text was updated successfully, but these errors were encountered: