From: Steve Klabnik Date: Thu, 21 Aug 2014 21:20:33 +0000 (-0400) Subject: Replace the Tutorial with the Guide. X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=a99ba25f2b59323ec37b9d8f0df7a68293cfc709;p=rust.git 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. --- diff --git a/README.md b/README.md index 097a2aeb6e4..9def5e305db 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/configure b/configure index 6cdbfadf637..58821fc81a2 100755 --- a/configure +++ b/configure @@ -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 diff --git a/mk/docs.mk b/mk/docs.mk index db0de4bde5b..e637dec3cf5 100644 --- a/mk/docs.mk +++ b/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))) ###################################################################### diff --git a/src/doc/guide.md b/src/doc/guide.md index ec5e544fa75..4f8b11b045e 100644 --- a/src/doc/guide.md +++ b/src/doc/guide.md @@ -1,14 +1,5 @@ % The Rust Guide -
-This guide is a work in progress. Until it is ready, we highly recommend that -you read the Tutorial 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. -
- -# 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: diff --git a/src/doc/intro.md b/src/doc/intro.md index 6deaa50867b..503ea2b1bbe 100644 --- a/src/doc/intro.md +++ b/src/doc/intro.md @@ -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. diff --git a/src/doc/po4a.conf b/src/doc/po4a.conf index 4069e630a84..d5e386325cb 100644 --- a/src/doc/po4a.conf +++ b/src/doc/po4a.conf @@ -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 diff --git a/src/doc/rust.md b/src/doc/rust.md index fb2407e5163..edd0442c105 100644 --- a/src/doc/rust.md +++ b/src/doc/rust.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.