Replace the Tutorial with the Guide.
The Guide isn't 100% perfect, but it's basically complete. It's certainly better than the tutorial is. Time to start pointing more people its way. I also just made it consistent to call all things 'guides' rather than tutorials. Fixes #9874. This is the big one. And two bugs that just go away. Fixes #14503. Fixes #15009.
This commit is contained in:
parent
1dc31953e7
commit
a99ba25f2b
@ -6,14 +6,14 @@ documentation.
|
||||
## Quick Start
|
||||
|
||||
1. Download a [binary installer][installer] for your platform.
|
||||
2. Read the [tutorial].
|
||||
2. Read the [guide].
|
||||
3. Enjoy!
|
||||
|
||||
> ***Note:*** Windows users can read the detailed
|
||||
> [getting started][wiki-start] notes on the wiki.
|
||||
|
||||
[installer]: http://www.rust-lang.org/install.html
|
||||
[tutorial]: http://doc.rust-lang.org/tutorial.html
|
||||
[guide]: http://doc.rust-lang.org/guide.html
|
||||
[wiki-start]: https://github.com/rust-lang/rust/wiki/Note-getting-started-developing-Rust
|
||||
[win-wiki]: https://github.com/rust-lang/rust/wiki/Using-Rust-on-Windows
|
||||
|
||||
@ -54,7 +54,7 @@ documentation.
|
||||
When complete, `make install` will place several programs into
|
||||
`/usr/local/bin`: `rustc`, the Rust compiler, and `rustdoc`, the
|
||||
API-documentation tool.
|
||||
3. Read the [tutorial].
|
||||
3. Read the [guide].
|
||||
4. Enjoy!
|
||||
|
||||
### Building on Windows
|
||||
@ -76,7 +76,7 @@ To easily build on windows we can use [MSYS2](http://sourceforge.net/projects/ms
|
||||
|
||||
[repo]: https://github.com/rust-lang/rust
|
||||
[tarball]: https://static.rust-lang.org/dist/rust-nightly.tar.gz
|
||||
[tutorial]: http://doc.rust-lang.org/tutorial.html
|
||||
[guide]: http://doc.rust-lang.org/guide.html
|
||||
|
||||
## Notes
|
||||
|
||||
|
1
configure
vendored
1
configure
vendored
@ -898,7 +898,6 @@ do
|
||||
make_dir $h/test/debuginfo-gdb
|
||||
make_dir $h/test/debuginfo-lldb
|
||||
make_dir $h/test/codegen
|
||||
make_dir $h/test/doc-tutorial
|
||||
make_dir $h/test/doc-guide
|
||||
make_dir $h/test/doc-guide-ffi
|
||||
make_dir $h/test/doc-guide-runtime
|
||||
|
11
mk/docs.mk
11
mk/docs.mk
@ -9,8 +9,7 @@
|
||||
# except according to those terms.
|
||||
|
||||
######################################################################
|
||||
# The various pieces of standalone documentation: guides, tutorial,
|
||||
# manual etc.
|
||||
# The various pieces of standalone documentation: guides, manual, etc
|
||||
#
|
||||
# The DOCS variable is their names (with no file extension).
|
||||
#
|
||||
@ -26,13 +25,13 @@
|
||||
# L10N_LANGS are the languages for which the docs have been
|
||||
# translated.
|
||||
######################################################################
|
||||
DOCS := index intro tutorial guide guide-ffi guide-macros guide-lifetimes \
|
||||
DOCS := index intro guide guide-ffi guide-macros guide-lifetimes \
|
||||
guide-tasks guide-container guide-pointers guide-testing \
|
||||
guide-runtime complement-bugreport \
|
||||
complement-lang-faq complement-design-faq complement-project-faq rust \
|
||||
rustdoc guide-unsafe guide-strings
|
||||
|
||||
PDF_DOCS := tutorial rust
|
||||
PDF_DOCS := guide rust
|
||||
|
||||
RUSTDOC_DEPS_rust := doc/full-toc.inc
|
||||
RUSTDOC_FLAGS_rust := --html-in-header=doc/full-toc.inc
|
||||
@ -226,7 +225,7 @@ $(foreach docname,$(DOCS),$(eval $(call DEF_DOC,$(docname))))
|
||||
#
|
||||
# As such, I've attempted to get it working as much as possible (and
|
||||
# switching from pandoc to rustdoc), but preserving the old behaviour
|
||||
# (e.g. only running on the tutorial)
|
||||
# (e.g. only running on the guide)
|
||||
.PHONY: l10n-mds
|
||||
l10n-mds: $(D)/po4a.conf \
|
||||
$(foreach lang,$(L10N_LANG),$(D)/po/$(lang)/*.md.po)
|
||||
@ -244,7 +243,7 @@ doc/l10n/$(1)/$(2).html: l10n-mds $$(HTML_DEPS) $$(RUSTDOC_DEPS_$(2))
|
||||
$$(RUSTDOC) $$(RUSTDOC_HTML_OPTS) $$(RUSTDOC_FLAGS_$(1)) doc/l10n/$(1)/$(2).md
|
||||
endef
|
||||
|
||||
$(foreach lang,$(L10N_LANGS),$(eval $(call DEF_L10N_DOC,$(lang),tutorial)))
|
||||
$(foreach lang,$(L10N_LANGS),$(eval $(call DEF_L10N_DOC,$(lang),guide)))
|
||||
|
||||
|
||||
######################################################################
|
||||
|
@ -1,14 +1,5 @@
|
||||
% The Rust Guide
|
||||
|
||||
<div style="border: 2px solid red; padding:5px;">
|
||||
This guide is a work in progress. Until it is ready, we highly recommend that
|
||||
you read the <a href="tutorial.html">Tutorial</a> instead. This work-in-progress Guide is being
|
||||
displayed here in line with Rust's open development policy. Please open any
|
||||
issues you find as usual.
|
||||
</div>
|
||||
|
||||
# Welcome!
|
||||
|
||||
Hey there! Welcome to the Rust guide. This is the place to be if you'd like to
|
||||
learn how to program in Rust. Rust is a systems programming language with a
|
||||
focus on "high-level, bare-metal programming": the lowest level control a
|
||||
@ -119,7 +110,7 @@ The first thing that we need to do is make a file to put our code in. I like
|
||||
to make a `projects` directory in my home directory, and keep all my projects
|
||||
there. Rust does not care where your code lives.
|
||||
|
||||
This actually leads to one other concern we should address: this tutorial will
|
||||
This actually leads to one other concern we should address: this guide will
|
||||
assume that you have basic familiarity with the command line. Rust does not
|
||||
require that you know a whole ton about the command line, but until the
|
||||
language is in a more finished state, IDE support is spotty. Rust makes no
|
||||
@ -215,7 +206,7 @@ Finally, the line ends with a semicolon (`;`). Rust is an **expression
|
||||
oriented** language, which means that most things are expressions. The `;` is
|
||||
used to indicate that this expression is over, and the next one is ready to
|
||||
begin. Most lines of Rust code end with a `;`. We will cover this in-depth
|
||||
later in the tutorial.
|
||||
later in the guide.
|
||||
|
||||
Finally, actually **compiling** and **running** our program. We can compile
|
||||
with our compiler, `rustc`, by passing it the name of our source file:
|
||||
@ -2017,7 +2008,7 @@ Great! Next up: let's compare our guess to the secret guess.
|
||||
|
||||
## Comparing guesses
|
||||
|
||||
If you remember, earlier in the tutorial, we made a `cmp` function that compared
|
||||
If you remember, earlier in the guide, we made a `cmp` function that compared
|
||||
two numbers. Let's add that in, along with a `match` statement to compare the
|
||||
guess to the secret guess:
|
||||
|
||||
|
@ -4,12 +4,12 @@ Rust is a systems programming language that combines strong compile-time correct
|
||||
It improves upon the ideas of other systems languages like C++
|
||||
by providing guaranteed memory safety (no crashes, no data races) and complete control over the lifecycle of memory.
|
||||
Strong memory guarantees make writing correct concurrent Rust code easier than in other languages.
|
||||
This tutorial will give you an idea of what Rust is like in about thirty minutes.
|
||||
This introduction will give you an idea of what Rust is like in about thirty minutes.
|
||||
It expects that you're at least vaguely familiar with a previous 'curly brace' language,
|
||||
but does not require prior experience with systems programming.
|
||||
The concepts are more important than the syntax,
|
||||
so don't worry if you don't get every last detail:
|
||||
the [tutorial](tutorial.html) can help you out with that later.
|
||||
the [guide](guide.html) can help you out with that later.
|
||||
|
||||
Let's talk about the most important concept in Rust, "ownership,"
|
||||
and its implications on a task that programmers usually find very difficult: concurrency.
|
||||
@ -433,5 +433,5 @@ yet get the efficiency of languages such as C++.
|
||||
|
||||
I hope that this taste of Rust has given you an idea if Rust is the right language for you.
|
||||
If that's true,
|
||||
I encourage you to check out [the tutorial](tutorial.html) for a full,
|
||||
I encourage you to check out [the guide](guide.html) for a full,
|
||||
in-depth exploration of Rust's syntax and concepts.
|
||||
|
@ -24,4 +24,4 @@
|
||||
[type: text] src/doc/intro.md $lang:doc/l10n/$lang/intro.md
|
||||
[type: text] src/doc/rust.md $lang:doc/l10n/$lang/rust.md
|
||||
[type: text] src/doc/rustdoc.md $lang:doc/l10n/$lang/rustdoc.md
|
||||
[type: text] src/doc/tutorial.md $lang:doc/l10n/$lang/tutorial.md
|
||||
[type: text] src/doc/guide.md $lang:doc/l10n/$lang/guide.md
|
||||
|
@ -13,16 +13,16 @@ provides three kinds of material:
|
||||
- Appendix chapters providing rationale and references to languages that
|
||||
influenced the design.
|
||||
|
||||
This document does not serve as a tutorial introduction to the
|
||||
This document does not serve as an introduction to the
|
||||
language. Background familiarity with the language is assumed. A separate
|
||||
[tutorial] document is available to help acquire such background familiarity.
|
||||
[guide] is available to help acquire such background familiarity.
|
||||
|
||||
This document also does not serve as a reference to the [standard]
|
||||
library included in the language distribution. Those libraries are
|
||||
documented separately by extracting documentation attributes from their
|
||||
source code.
|
||||
|
||||
[tutorial]: tutorial.html
|
||||
[guide]: guide.html
|
||||
[standard]: std/index.html
|
||||
|
||||
## Disclaimer
|
||||
@ -4174,7 +4174,7 @@ communication facilities.
|
||||
The Rust compiler supports various methods to link crates together both
|
||||
statically and dynamically. This section will explore the various methods to
|
||||
link Rust crates together, and more information about native libraries can be
|
||||
found in the [ffi tutorial][ffi].
|
||||
found in the [ffi guide][ffi].
|
||||
|
||||
In one session of compilation, the compiler can generate multiple artifacts
|
||||
through the usage of either command line flags or the `crate_type` attribute.
|
||||
|
Loading…
Reference in New Issue
Block a user