Skip to content

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

Merged
merged 1 commit into from
Jan 14, 2014
Merged

Conversation

alexcrichton
Copy link
Member

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!


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.
Copy link
Contributor

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?

Copy link
Contributor

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?

@adrientetar
Copy link
Contributor

Can you add it to index.md also?

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.
Copy link
Contributor

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.'

@brson
Copy link
Contributor

brson commented Jan 13, 2014

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
Copy link
Contributor

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.

@brson
Copy link
Contributor

brson commented Jan 13, 2014

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
Copy link
Member

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 ".

@alexcrichton
Copy link
Member Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I/O

bors added a commit that referenced this pull request Jan 14, 2014
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!
@bors bors closed this Jan 14, 2014
@bors bors merged commit 289ba10 into rust-lang:master Jan 14, 2014
@alexcrichton alexcrichton deleted the dox branch January 15, 2014 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants