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

Add thorough documentation to helper functions and structs #416

Open
raccog opened this issue Apr 25, 2022 · 4 comments
Open

Add thorough documentation to helper functions and structs #416

raccog opened this issue Apr 25, 2022 · 4 comments
Labels
documentation Issues related to the documentation enhancement help wanted

Comments

@raccog
Copy link
Contributor

raccog commented Apr 25, 2022

Hello, I've been implementing a UEFI bootloader in Rust and really enjoy how this project is turning out! I was wondering if I could help contribute to the documentation, as there are some functions and structs that I feel could be better documented.

For example, I think it would be nice if helper functions like get_image_file_system() would describe both the possible errors that can occur and also which UEFI interfaces/functions are used. As helper functions like this are not described in the UEFI specification, it would be nice to be able to look at the crate documentation for detailed information.

I also think that adding documentation on how to get an instance of each struct would be helpful, too. For example, the struct BootServices can be retrieved by calling boot_services() on SystemTable. Although examples such as this are described in the UEFI spec, it would be convenient to provide a link to boot_services() from BootService's documentation. Another example is to provide a link to get_image_file_system() and locate_device_path() (and other functions that can return a SimpleFileSystem) in SimpleFileSystem's documentation.

I was also going to suggest adding documentation for why protocols are wrapped in UnsafeCell, but from the most recent commit, it seems like this is already covered!

@nicholasbishop
Copy link
Contributor

Hi, thanks for filing this issue. Contributions to documentation are definitely very welcome! I think the examples you give of places that could use additional documentation and intra-doc links all sound like good additions.

@GabrielMajeri GabrielMajeri added enhancement help wanted documentation Issues related to the documentation labels Apr 26, 2022
raccog added a commit to raccog/uefi-rs that referenced this issue Apr 27, 2022
The links show which methods in `SystemTable` can be called to get
a reference of each struct.

rust-osdev#416
@raccog
Copy link
Contributor Author

raccog commented Apr 27, 2022

I just added a small amount of documentation that links BootServices to boot_services() and RuntimeServices to runtime_services().

I plan on slowly adding more documentation where I think it would be beneficial in the crate. Should I make a single pull request for each documentation change, or should I wait until I have more substantial changes to make a larger pull request?

@GabrielMajeri
Copy link
Collaborator

@raccog Thanks!

I plan on slowly adding more documentation where I think it would be beneficial in the crate. Should I make a single pull request for each documentation change, or should I wait until I have more substantial changes to make a larger pull request?

As you prefer. In theory, individual PRs are easier to review, but if you keep each commit atomic and with a relevant title, then the effort would be the same for us.

@raccog
Copy link
Contributor Author

raccog commented Apr 28, 2022

@GabrielMajeri Great! I'll submit a small PR to start off and then go from there.

nicholasbishop pushed a commit that referenced this issue Apr 30, 2022
The links show which methods in `SystemTable` can be called to get
a reference of each struct.

#416
raccog added a commit to raccog/uefi-rs that referenced this issue Apr 30, 2022
raccog added a commit to raccog/uefi-rs that referenced this issue Apr 30, 2022
raccog added a commit to raccog/uefi-rs that referenced this issue Apr 30, 2022
These links now show that they link to functions in `SystemTable`.

Fix documentation for rust-osdev#416
raccog added a commit to raccog/uefi-rs that referenced this issue Apr 30, 2022
raccog added a commit to raccog/uefi-rs that referenced this issue May 2, 2022
raccog added a commit to raccog/uefi-rs that referenced this issue May 2, 2022
These links now show that they link to functions in `SystemTable`.

Fix documentation for rust-osdev#416
raccog added a commit to raccog/uefi-rs that referenced this issue May 2, 2022
nicholasbishop pushed a commit to raccog/uefi-rs that referenced this issue May 2, 2022
nicholasbishop pushed a commit to raccog/uefi-rs that referenced this issue May 2, 2022
These links now show that they link to functions in `SystemTable`.

Fix documentation for rust-osdev#416
nicholasbishop pushed a commit to raccog/uefi-rs that referenced this issue May 2, 2022
nicholasbishop pushed a commit that referenced this issue May 2, 2022
nicholasbishop pushed a commit that referenced this issue May 2, 2022
These links now show that they link to functions in `SystemTable`.

Fix documentation for #416
nicholasbishop pushed a commit that referenced this issue May 2, 2022
raccog added a commit to raccog/uefi-rs that referenced this issue Dec 2, 2022
Add paragraph spacing for docs introduced in pull request rust-osdev#600

More documentation for issue rust-osdev#416
phip1611 pushed a commit to raccog/uefi-rs that referenced this issue Dec 2, 2022
Add paragraph spacing for docs introduced in pull request rust-osdev#600

More documentation for issue rust-osdev#416
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues related to the documentation enhancement help wanted
Projects
None yet
Development

No branches or pull requests

3 participants