Skip to content
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

Improve docs #64

Merged
merged 6 commits into from Jul 13, 2022
Merged

Improve docs #64

merged 6 commits into from Jul 13, 2022

Conversation

Techie-Pi
Copy link
Member

@Techie-Pi Techie-Pi commented Jul 10, 2022

Following some suggestions from #32, I've made some changes to improve documentation.

  • Added a simple Doxygen to Rustdoc script
  • Applied some rustdoc suggestions
  • Fixed doctests from Fs (mostly minor syntax issues)
  • Removed --no-doc-comments from bindgen.sh to generate kind of docs for users of ctru-sys

@Techie-Pi Techie-Pi marked this pull request as draft July 11, 2022 14:00
Right now, only basic things are changed (remove ``@`` annotations, trim spaces, etc.).
In the future, changes will be made (mostly to _truly_ transform ``@param``to rustdoc conventions.

Right now, the documentation is mostly decent, and definitely understandable
@Techie-Pi
Copy link
Member Author

I added a simple docstring to rustdoc conversion mechanism. Now the documentation generated by bindgen is usable.

Example screenshot of random function:
image

@Techie-Pi Techie-Pi marked this pull request as ready for review July 11, 2022 16:03
@@ -29,3 +28,5 @@ bindgen "$DEVKITPRO/libctru/include/3ds.h" \
-DARM11 \
-D__3DS__ \
> src/bindings.rs

cargo run --bin docstring-to-rustdoc -- src/bindings.rs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh, I didn't see that until now! Thanks, I'll check it out!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing's implemented there, but someone else did have the idea to open an issue at least.

ctru-sys/src/bin/docstring-to-rustdoc.rs Show resolved Hide resolved
ctru-sys/src/bin/docstring-to-rustdoc.rs Outdated Show resolved Hide resolved
@@ -29,3 +28,5 @@ bindgen "$DEVKITPRO/libctru/include/3ds.h" \
-DARM11 \
-D__3DS__ \
> src/bindings.rs

cargo run --bin docstring-to-rustdoc -- src/bindings.rs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing's implemented there, but someone else did have the idea to open an issue at least.

@@ -0,0 +1,70 @@
//! This script transforms _some_ Boxygen comments to Rustdoc format
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I had been looking for something like this builtin to bindgen but this little script is a good workaround.

Copy link
Member Author

@Techie-Pi Techie-Pi Jul 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm working on something more advanced on a personal repo, if you are interested to check it out: Techie-Pi/doxygen-rs

@AzureMarker AzureMarker merged commit 419f191 into rust3ds:master Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants