-
Notifications
You must be signed in to change notification settings - Fork 13.3k
dox: Write a guide to the rust runtime #11501
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
|
||
First and foremost, you do *not* need a runtime to run Rust code. The compiler | ||
is capable of generating code that works in all environments, even kernel | ||
environments. A number of proof-of-concept kernels have been written as rust. |
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.
s/as rust/in Rust
?
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.
or is this an expression?
Can you add it to |
is capable of generating code that works in all environments, even kernel | ||
environments. A number of proof-of-concept kernels have been written as rust. | ||
The compiler itself does not need a runtime to provide safety, this is all | ||
performed at compile time. |
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 sentence is a little unclear. Maybe something more like 'Neither does the Rust language need a runtime to provide memory safety; the type system itself is sufficient to write safe code, verified statically at compile time. The runtime merely uses the safety features of the language to build a number of convenient and safe high-level abstractions.'
Please always capitalize 'Rust' in docs. |
tasks are able to consume. | ||
|
||
This interface is implemented differently for various flavors of tasks, and is | ||
designed with a focus around blocking I/O calls. This architecture does not |
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.
I would call it 'synchronous' instead of 'blocking', since sync/async are most commonly understood as the two strategies for doing I/O.
Awesome! Thanks for writing this up. Needs to be added to index.md and tests.mk. |
@@ -0,0 +1,249 @@ | |||
% A Guide to the Rust Runtime | |||
|
|||
First and foremost, you do *not* need a runtime to run Rust code. The compiler |
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 seems like a peculiar way to start the guide. Maybe the first sentence could "Rust includes two runtime libraries in the standard distribution, which provide a unified interface to things like IO, but the language itself does not require a runtime. The compiler is capable of generating code ".
I have updated with all the comments, thanks everyone! |
% A Guide to the Rust Runtime | ||
|
||
Rust includes two runtime libraries in the standard distribution, which provide | ||
a unified interface to primitives such as IO, but the language itself does not |
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.
I/O
The official documentation sorely needs an explanation of the rust runtime and what it is exactly, and I want this guide to provide that information. I'm unsure of whether I've been too light on some topics while too heavy on others. I also feel like a few things are still missing. As always, feedback is appreciated, especially about things you'd like to see written about!
The official documentation sorely needs an explanation of the rust runtime and what it is exactly, and I want this guide to provide that information.
I'm unsure of whether I've been too light on some topics while too heavy on others. I also feel like a few things are still missing. As always, feedback is appreciated, especially about things you'd like to see written about!