-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 more comprehensive crate level docs for bevy_ptr #12391
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.
Really awesome stuff: this is exactly the sort of writeup I was hoping for when I spun out that issue.
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.
This is some great documentation, but I have a few clarity and grammatical suggestions.
crates/bevy_ptr/README.md
Outdated
@@ -6,8 +6,104 @@ | |||
[![Docs](https://docs.rs/bevy_ptr/badge.svg)](https://docs.rs/bevy_ptr/latest/bevy_ptr/) | |||
[![Discord](https://img.shields.io/discord/691052431525675048.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/bevy) | |||
|
|||
The `bevy_ptr` crate provides low-level abstractions for working with pointers in a more safe way than using rust's raw pointers. | |||
Pointers in computer programming, according to Wikipedia, are "objects in many programming languages that stores a memory address". |
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.
Pointers in computer programming, according to Wikipedia, are "objects in many programming languages that stores a memory address". | |
A pointer, according to Wikipedia, is an "object in many programming languages that stores a memory address". |
This fixes the plurality grammatical error where "stores" should be singular.
I would recommend rewriting this phrase, though. I don't think quoting Wikipedia is necessary here, especially with the "in many programming languages" part. It's implied that this is programming related, so the phrase is redundant.
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.
Agreed. Reworded this section.
crates/bevy_ptr/README.md
Outdated
with them safer. | ||
|
||
`bevy_ptr` is a crate that attempts to bridge the gap between the full blown unsafety of `*mut ()` and the safe `&'a T`, allowing users | ||
to build progressively to choose what invariants to uphold. |
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.
to build progressively to choose what invariants to uphold. | |
to choose which invariants to uphold. |
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.
Reworded this ti be a bit clear what I meant here.
Co-authored-by: BD103 <[email protected]>
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, thank you!
Objective
Fixes #12301. Provide more comprehensive crate level docs for bevy_ptr, explaining it's methodology and design.
Solution
Write out said docs.