-
Notifications
You must be signed in to change notification settings - Fork 10
Updates to doc structures and using rustdoc format #266
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few minor lessons learned from my work with rustdoc on fdtables. Let me know if any of my feedback isn't clear...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bunch of comments here about what does and doesn't belong in Rustdoc. I'm happy to discuss further.
//! | ||
//! Cages have methods for filesystem-related calls. They return a code or an error from the `errno` enum. | ||
//! | ||
//! - [open_syscall](crate::safeposix::cage::Cage::open_syscall) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, that Rustdoc will automatically create a list like this for you for each of the functions. I'm not sure you need to do this manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, the sys calls are implemented as part of Cage struct. and we implemented them in different modules for better maintainability. but rustdoc associates these functions to Cage struct and these modules turn up empty. so added these lists to redirect to the Cage docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, please make sure you indicate this in a comment in the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(By the way, you can look at fdtables, which has a similar issue but gets around it. This may change the visibility / import structure of the code though. I honestly, don't recall exactly how I did this.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor change requests but mostly this looks good to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved!
@JustinCappos Id love to get your approval on this one too before I merge it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Please do explain why the functions are listed the way they are for posterity. Otherwise, I think it's okay to merge.
Description
Reformatting documentation to follow rustdoc format. enabling us to move towards Rust crate style documentation, supporting auto doc generation.
will be adding general templates for documenting structs, functions, traits here - style guide
Following rustdoc book for overall guidance and rust docs conventions from microsoft opensource resources.
rustdoc book
templates
Fixes # (issue)
Type of change
How Has This Been Tested?
lind_project/tests/test_cases/test_a.c
lind_project/tests/test_cases/test_b.c
Checklist: