Skip to content
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

Replace the Tutorial with the Guide. #16657

Merged
merged 2 commits into from
Sep 12, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down
9 changes: 4 additions & 5 deletions mk/docs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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).
#
Expand All @@ -32,7 +31,7 @@ DOCS := index intro tutorial guide guide-ffi guide-macros guide-lifetimes \
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
Expand Down Expand Up @@ -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)
Expand All @@ -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)))


######################################################################
Expand Down
15 changes: 3 additions & 12 deletions src/doc/guide.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:

Expand Down
6 changes: 3 additions & 3 deletions src/doc/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
2 changes: 1 addition & 1 deletion src/doc/po4a.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions src/doc/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
Loading