-
Notifications
You must be signed in to change notification settings - Fork 19
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
Formulate Chapter Material for Learn unsafe Rust #123
Comments
I'd like to review, |
Interested in: |
This is a great idea, the Learn Unsafe Rust book's chapter organization is currently a mess and we probably could do much better. |
@Manishearth -- as we're looking to contribute to the Learn unsafe Rust book, a couple of questions:
|
(Sorry, been extremely busy these weeks, I'm going to try and respond to this soon) |
Hey, nice to e-meet you, I started going through the info and I'd like to review |
Hi @PLeVasseur I opened this issue to apply for the consortium with motivation, noticed it was closed and then got the invitation through gmail to today's coding guidelines subcommittee meeting. Does it mean the application to the consortium went through? In any case, I will open the issue for the coding guidelines subcommittee. Thanks for the swift reply! |
Hi @PLeVasseur ,
|
I'd be happy to add sections/definitions on the following:
|
It's a nice example, would this be like a tour through the different parts? That would work nicely as an introduction.
Yeah even figuring out what sections the book should have, and in which order, is a huge help. In general my goals for each chapter are:
|
Though I do think this should be done by someone who has a really good understanding of how unsafe works in Rust. There's a certain flow to it, many things depend on many other things. |
That's my thought: a tour through. Intro might be a nice idea for where it fits in.
While I serve as chair, I would not put myself among the crowd that has this level of understanding, frankly. As I've begun to learn more about unsafe, it's true that there's many interlocking pieces. Anyone else in the subcommittee that does I'd welcome to help guide section choice and ordering! |
As part of the review of the unsafe coding guidelines glossary rustfoundation#123.
@adfernandes -- from what I'm reading this is more to the mission of filling in broader safety-critical Rust coding guidelines, which I think is great! Since these are a number of different categories, outside of the realm of unsafe, I'd like to keep track of them properly. What do you think about opening an issue for each so they can be tracked and worked? |
Hey folks -- I'm considering how we want to frame up the contributions we'll make to Learn unsafe Rust. Much like how the practicum chapter draft could be an introduction and walkthrough to the book, I think it makes sense to gather references and drafts under folders in this repo to prepare for contribution. For example, if you've taken ABI (of a type), you can reference that it'd go under ABI and FFI. So the structure could look like:
to match the Learn unsafe Rust book structure. I updated the first comment with a mapping from Unsafe Coding Guidelines Reference Glossary -> Learn unsafe Rust that can be referenced to find where your contribution would go in this folder structure. |
So I got to thinking that it may make a nice focus for our work if we chose topics from the glossary which can feed into becoming a chapter for the Learn unsafe Rust book. Each person could still take a few topics and we could still (maybe should have!) topic overlap. The intent to make those few topics focused towards being able to eventually write a chapter. I made this an agenda item for our meeting tomorrow, so let's chat more about it there. |
@PLeVasseur I'm happy to open an issue for each, but I'd like to bring up my comment from the pull request. I think there really needs to be a distinction (and separation) between "Unsafe Rust" and "Safety-Critical Unsafe Rust"... I'm just not certain exactly what that is right now, without some thought... See, for example this project / comment about a codebase that's littered with The upcoming MISRA guidelines will help, I'm supposing... but what additional burden of proof does "unsafe" require that, for example, recursive mutexes (and hence the possibility of deadlock) do or don't? |
I'd be willing to review the currently open items:
Also, I'm interested in the rabbit hole that might be:
Of course several of these things have overlap (e.g. "representation" and "niche" and "padding"). |
Hey @adfernandes -- yeah it makes sense to have some discussion on this in our meeting today. I feel like it dovetails a bit with the discussions we had last time on where to draw the the line on
|
@PLeVasseur I knew I was remembering something like a pre-existing "safety critical Rust book" from somewhere, and I finally remembered / found it: there's a group I'm not familiar with writing a book on High Assurance Rust. I've only skimmed the book, but it seems to start at the beginning and slowing grow to more advanced topics. Not certain what the authors' affiliations are, if any, or of they're on the committee or not. Edit: I think I found the repo owner - Tiemoko Ballo - who is at 1Password. I know they use Rust extensively in their back end, so I'm guessing that Tiemoko's personal repo refers to "data security safety". |
I am interested in ABI & FFI chapter. |
Pointer Aliasing, interested people for me. Thx. |
Here are my notes from the 2025-01-15 meeting about the Learn unsafe Rust volunteers,
|
Thanks @vapdrs for pulling together the list from our meeting! I've updated the table in the first comment with folks that were in the meeting. Folks who expressed interest, but were not in the meeting (IIRC?) @iglesias, @Dillonmcewan -- @iglesias -- I moved your name to the table for Pointer aliasing under Interested. If you'd like to be Responsible that works, or be working on another chapter, that works too. @Dillonmcewan -- do you still see yourself contributing and if so, under which chapter of the Learn unsafe Rust book I highlight at the bottom of the first post? Once I've cleared up all the contributions currently, I'll rework the first post, including removing the "Unsafe Coding Guidelines (UCG) Reference Glossary Topics & Folks Interested" to make it a bit easier to parse. |
* Add pointer arithmetic example in relation with allocation. As part of the review of the unsafe coding guidelines glossary #123. * Move pointer arithmetic ex. to unaligned pointers in chapter structure.
@darkwisebear, @vjonaswolf -- could you folks create tracking issues for the chapters you're responsible for? I'll do the same for the Dangling and unaligned pointers chapter. :) |
I've created #150 for the ABI and FFI topic, with a list of potential topics to cover. Please have a look and feel free to add content ideas; I'll provide an initial draft soon(tm). |
People interested about pointer aliasing being already 3, can you put me in Intrinsics interested people ? Thx. |
Done! Put this as #151 |
Hi @PLeVasseur, I've been traveling so unfortunately wasn't able to respond to your comment until now. I don't know if I'll have much time to contribute in the short term, but would like to stay involved in some way. I'm happy to help with reviewing/proof reading any content. I did some research on the following topics, so would probably be the most helpful with those sections: |
Hey @Dillonmcewan -- in that case, I'd rather not sign you up directly for an interested category unless you'd slot yourself into one of the three buckets currently started:
If you'd count yourself among the "interested", I'll note you down, but otherwise I'll go ahead and clean up the first comment to remove the previous table. |
Okay, that sounds good. I'll just try to keep up on this thread and help where I can! |
Hey folks 👋 using this as the general tracking issue for contributions we'll make to Learn unsafe Rust, out of the Coding Guidelines Subcommittee.
Contribution Model
Edit: I've proposed and had accepted by members of the subcommittee to change-up how we're going to tackle fleshing out guidelines around
unsafe
in Rust. My intent here is to attempt to focus our work a bit to have some tangible outputs, improving the state of guidance aroundunsafe
useful to safety-critical applications and the wider Rust community.The process I outlined was one in which:
Chapter goal and style guidelines
In the goals for each chapter are:
Lifted from guidance provided by @Manishearth here.
Mapping from Unsafe Coding Guidelines Reference Glossary to Learn unsafe Rust
A good resource to reference is the Unsafe Coding Guidelines (UCG) Reference Glossary. Below you can find a mapping between the UCG Glossary topics and Learn unsafe Rust
Core unsafety
Advanced unsafety
Expert unsafety
Initial Chapters for Contribution to Learn unsafe Rust
Some (possibly biased!) ranking of chapters from Learn unsafe Rust I think would be particularly handy for a group working in a safety-critical context:
The text was updated successfully, but these errors were encountered: