Skip to content

Commit a30d61b

Browse files
committed
Various READMEs and docs cleanup
Noticeably closes #11428.
1 parent 01794cc commit a30d61b

12 files changed

+158
-153
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
If you're just reporting a bug, please see:
44

5-
https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
5+
http://static.rust-lang.org/doc/master/complement-bugreport.html
66

77
## Pull request procedure
88

README.md

+24-27
Original file line numberDiff line numberDiff line change
@@ -7,50 +7,49 @@ documentation.
77

88
### Windows
99

10-
1. Download and use the [installer][win-exe].
10+
1. Download and use the [installer and MinGW][win-wiki].
1111
2. Read the [tutorial].
1212
2. Enjoy!
1313

14-
> ***Note:*** Windows users should read the detailed
15-
> [getting started][wiki-start] notes on the wiki. Even when using
16-
> the binary installer the Windows build requires a MinGW installation,
17-
> the precise details of which are not discussed here.
14+
> ***Note:*** Windows users can read the detailed
15+
> [getting started][wiki-start] notes on the wiki.
1816
1917
[tutorial]: http://static.rust-lang.org/doc/tutorial.html
2018
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
21-
[win-exe]: http://static.rust-lang.org/dist/rust-0.9-install.exe
19+
[win-wiki]: https://github.com/mozilla/rust/wiki/Using-Rust-on-Windows
2220

2321
### Linux / OS X
2422

25-
1. Install the prerequisites (if not already installed)
26-
* g++ 4.4 or clang++ 3.x
27-
* python 2.6 or later (but not 3.x)
28-
* perl 5.0 or later
29-
* gnu make 3.81 or later
30-
* curl
31-
2. Download and build Rust
23+
1. Make sure you have installed the dependencies:
24+
* `g++` 4.4 or `clang++` 3.x
25+
* `python` 2.6 or later (but not 3.x)
26+
* `perl` 5.0 or later
27+
* GNU `make` 3.81 or later
28+
* `curl`
29+
2. Download and build Rust:
30+
3231
You can either download a [tarball] or build directly from the [repo].
33-
32+
3433
To build from the [tarball] do:
35-
34+
3635
$ curl -O http://static.rust-lang.org/dist/rust-0.9.tar.gz
3736
$ tar -xzf rust-0.9.tar.gz
3837
$ cd rust-0.9
39-
38+
4039
Or to build from the [repo] do:
4140

4241
$ git clone https://github.com/mozilla/rust.git
4342
$ cd rust
4443

4544
Now that you have Rust's source code, you can configure and build it:
46-
45+
4746
$ ./configure
4847
$ make && make install
49-
50-
You may need to use `sudo make install` if you do not normally have
51-
permission to modify the destination directory. The install locations can
52-
be adjusted by passing a `--prefix` argument to `configure`. Various other
53-
options are also supported, pass `--help` for more information on them.
48+
49+
> ***Note:*** You may need to use `sudo make install` if you do not normally have
50+
> permission to modify the destination directory. The install locations can
51+
> be adjusted by passing a `--prefix` argument to `configure`. Various other
52+
> options are also supported, pass `--help` for more information on them.
5453
5554
When complete, `make install` will place several programs into
5655
`/usr/local/bin`: `rustc`, the Rust compiler; `rustdoc`, the
@@ -76,22 +75,20 @@ Snapshot binaries are currently built and tested on several platforms:
7675
* Linux (various distributions), x86 and x86-64
7776
* OSX 10.6 ("Snow Leopard") or greater, x86 and x86-64
7877

79-
You may find that other platforms work, but these are our "tier 1"
78+
You may find that other platforms work, but these are our officially
8079
supported build environments that are most likely to work.
8180

82-
Rust currently needs about 1.8G of RAM to build without swapping; if it hits
81+
Rust currently needs about 1.5 GiB of RAM to build without swapping; if it hits
8382
swap, it will take a very long time to build.
8483

85-
There is lots more documentation in the [wiki].
84+
There is a lot more documentation in the [wiki].
8685

8786
[wiki]: https://github.com/mozilla/rust/wiki
8887

89-
9088
## License
9189

9290
Rust is primarily distributed under the terms of both the MIT license
9391
and the Apache License (Version 2.0), with portions covered by various
9492
BSD-like licenses.
9593

9694
See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.
97-

doc/README

-28
This file was deleted.

doc/README.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Dependencies
2+
3+
[Pandoc](http://johnmacfarlane.net/pandoc/installing.html), a universal
4+
document converter, is required to generate docs as HTML from Rust's
5+
source code.
6+
7+
[Node.js](http://nodejs.org/) is also required for generating HTML from
8+
the Markdown docs (reference manual, tutorials, etc.) distributed with
9+
this git repository.
10+
11+
# Building
12+
13+
To generate all the docs, just run `make docs` from the root of the repository.
14+
This will convert the distributed Markdown docs to HTML and generate HTML doc
15+
for the 'std' and 'extra' libraries.
16+
17+
To generate HTML documentation from one source file/crate, do something like:
18+
19+
~~~~
20+
rustdoc --output-dir html-doc/ --output-format html ../src/libstd/path.rs
21+
~~~~
22+
23+
(This, of course, requires a working build of the `rustdoc` tool.)
24+
25+
# Additional notes
26+
27+
To generate an HTML version of a doc from Markdown without having Node.js
28+
installed, you can do something like:
29+
30+
~~~~
31+
pandoc --from=markdown --to=html5 --number-sections -o rust.html rust.md
32+
~~~~
33+
34+
(rust.md being the Rust Reference Manual.)
35+
36+
The syntax for pandoc flavored markdown can be found at:
37+
http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown
38+
39+
A nice quick reference (for non-pandoc markdown) is at:
40+
http://kramdown.rubyforge.org/quickref.html

doc/complement-bugreport.md

+16-18
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,45 @@
1-
% HOWTO submit a RUST bug report
1+
% How to submit a Rust bug report
22

33
# I think I found a bug in the compiler!
44

5-
If you see this message: ''error: internal compiler error: unexpected failure'',
5+
If you see this message: `error: internal compiler error: unexpected failure`,
66
then you have definitely found a bug in the compiler. It's also possible that
77
your code is not well-typed, but if you saw this message, it's still a bug in
88
error reporting.
99

10-
If you see a message about an LLVM assertion failure, then you have also
10+
If you see a message about an LLVM assertion failure, then you have also
1111
definitely found a bug in the compiler. In both of these cases, it's not your
1212
fault and you should report a bug!
1313

14-
If you see a compiler error message that you think is meant for users to see,
14+
If you see a compiler error message that you think is meant for users to see,
1515
but it confuses you, *that's a bug too*. If it wasn't clear to you, then it's
1616
an error message we want to improve, so please report it so that we can try
1717
to make it better.
1818

19-
# I don't want to waste the Rust devs' time! How do I know the bug I found isn't a bug that already exists in the issue tracker?
19+
# How do I know the bug I found isn't a bug that already exists in the issue tracker?
2020

21-
If you don't have much time, then don't worry about that. Just submit the bug.
22-
If it's a duplicate, somebody will notice that and close it. No one will laugh
23-
at you, we promise (and if someone did, they would be violating the Rust
24-
[code of conduct](https://github.com/mozilla/rust/wiki/Note-development-policy code of conduct)).
21+
If you don't have enough time for a search, then don't worry about that. Just submit
22+
the bug. If it's a duplicate, somebody will notice that and close it during triage.
2523

26-
If you have more time, it's very helpful if you can type the text of the error
24+
If you have the time for it, it would be useful to type the text of the error
2725
message you got [into the issue tracker search box](https://github.com/mozilla/rust/issues)
2826
to see if there's an existing bug that resembles your problem. If there is,
29-
and it's an open bug, you can comment on that issue and say you ran into it too.
30-
This will encourage devs to fix it. But again, don't let this stop you from
27+
and it's an open bug, you can comment on that issue and say you are also affected.
28+
This will encourage the devs to fix it. But again, don't let this stop you from
3129
submitting a bug. We'd rather have to do the work of closing duplicates than
3230
miss out on valid bug reports.
3331

3432
# What information should I include in a bug report?
3533

36-
It's helpful to include your specific OS (for example: Mac OS X 10.8.3,
37-
Windows 7, Ubuntu 12.0.4) and your hardware architecture (for example: i686, x86_64).
34+
It generally helps our diagnosis to include your specific OS (for example: Mac OS X 10.8.3,
35+
Windows 7, Ubuntu 12.04) and your hardware architecture (for example: i686, x86_64).
3836
It's also helpful to copy/paste the output of re-running the erroneous rustc
39-
commmand with the `-v` flag. Finally, if you can run the offending command under gdb,
40-
pasting a stack trace can be useful; to do so, you will need to set a breakpoint on `rust_begin_unwind`.
37+
command with the `-v` flag. Finally, if you can run the offending command under gdb,
38+
pasting a stack trace can be useful; to do so, you will need to set a breakpoint on `rust_fail`.
4139

42-
# I submitted a bug, but nobody has commented on it! I'm sad.
40+
# I submitted a bug, but nobody has commented on it!
4341

44-
This is sad, but does happen sometimes, since we're short-staffed. If you
42+
This is sad, but does happen sometimes, since we're short-staffed. If you
4543
submit a bug and you haven't received a comment on it within 3 business days,
4644
it's entirely reasonable to either ask on the #rust IRC channel,
4745
or post on the [rust-dev mailing list](https://mail.mozilla.org/listinfo/rust-dev)

doc/complement-lang-faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ They start small (ideally in the hundreds of bytes) and expand dynamically by ca
236236

237237
* Requiring explicit bounds means that the compiler can type-check the code at the point where the type-parametric item is *defined*, rather than delaying to when its type parameters are instantiated. You know that *any* set of type parameters fulfilling the bounds listed in the API will compile. It's an enforced minimal level of documentation, and results in very clean error messages.
238238

239-
* Scoping of methods is also a problem. C++ needs [Koenig (argument dependent) lookup](http://en.wikipedia.org/wiki/Argument-dependent_name_lookup), which comes with its own host of problems. Explicit bounds avoid this issue: traits are explicitly imported and then used as bounds on type parameters, so there is a clear mapping from the method to its implementation (via the trait and the instantiated type).
239+
* Scoping of methods is also a problem. C++ needs [Koenig (argument dependent) lookup](http://en.wikipedia.org/wiki/Argument-dependent_name_lookup), which comes with its own host of problems. Explicit bounds avoid this issue: traits are explicitly imported and then used as bounds on type parameters, so there is a clear mapping from the method to its implementation (via the trait and the instantiated type).
240240

241241
* Related to the above point: since a parameter explicitly names its trait bounds, a single type is able to implement traits whose sets of method names overlap, cleanly and unambiguously.
242242

doc/complement-project-faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Existing languages at this level of abstraction and efficiency are unsatisfactor
1515
# What are some non-goals?
1616

1717
* To employ any particularly cutting-edge technologies. Old, established techniques are better.
18-
* To prize expressiveness, minimalism or elegance above other goals. These are desirable but subordinate goals.
18+
* To prize expressiveness, minimalism or elegance above other goals. These are desirable but subordinate goals.
1919
* To cover the "systems language" part all the way down to "writing an OS kernel".
2020
* To cover the complete feature-set of C++, or any other language. It should provide majority-case features.
2121
* To be 100% static, 100% safe, 100% reflective, or too dogmatic in any other sense. Trade-offs exist.

doc/complement-usage-faq.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,11 @@ If you aren't sure which paths you need, try setting RUST_LOG to `::help` and ru
2020

2121
This is much like the answer for `log` statements, except that you also need to compile your program in debug mode (that is, pass `--cfg debug` to `rustc`). Note that if you want to see the instrumentation of the `debug!` statements within `rustc` itself, you need a debug version of `rustc`; you can get one by invoking `configure` with the `--enable-debug` option.
2222

23-
# What does it mean when a program exits with `leaked memory in rust main loop (2 objects)' failed, rt/memory_region.cpp:99 2 objects`?
23+
# What does it mean when a program exits with `leaked memory`?
2424

25-
This message indicates a memory leak, and is mostly likely to happen on rarely exercised failure paths. Note that failure unwinding is not yet implemented on windows so this is expected. If you see this on Linux or Mac it's a compiler bug; please report it.
26-
27-
# Why do gdb backtraces end with the error 'previous frame inner to this frame (corrupt stack?)'?
25+
The error looks like this: `leaked memory in rust main loop (2 objects)' failed, rt/memory_region.cpp:99 2 objects`.
2826

29-
**Short answer** your gdb is too old to understand our hip new stacks. Upgrade to a newer version (7.3.1 is known to work).
30-
31-
**Long answer** Rust uses 'spaghetti stacks' (a linked list of stacks) to allow tasks to start very small but recurse arbitrarily deep when necessary. As a result, new frames don't always decrease the stack pointer like gdb expects but instead may jump around the heap to different stack segments. Newer versions of gdb recognize that the special function called __morestack may change the stack pointer to a different stack.
27+
This message indicates a memory leak, and is mostly likely to happen on rarely exercised failure paths. Note that failure unwinding is not yet implemented on windows so this is expected. If you see this on Linux or Mac it's a compiler bug; please report it.
3228

3329
# Why did my build create a bunch of zero-length files in my lib directory?
3430

doc/index.md

+28-26
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,46 @@
66
.header-section-number { display: none; }
77
</style>
88

9-
[The Rust tutorial](tutorial.html)
10-
[The Rust reference manual](rust.html) ([PDF](rust.pdf))
9+
[The Rust tutorial](tutorial.html) ([PDF](tutorial.pdf))
10+
[The Rust reference manual](rust.html) ([PDF](rust.pdf))
1111

1212
# Guides
1313

14-
[Pointers](guide-pointers.html)
15-
[References and Lifetimes](guide-lifetimes.html)
16-
[Containers and Iterators](guide-container.html)
17-
[Tasks and Communication](guide-tasks.html)
18-
[Foreign Function Interface](guide-ffi.html)
19-
[Macros](guide-macros.html)
20-
[Packaging](guide-rustpkg.html)
21-
[Testing](guide-testing.html)
22-
[Conditions](guide-conditions.html)
14+
[Pointers](guide-pointers.html)
15+
[References and Lifetimes](guide-lifetimes.html)
16+
[Containers and Iterators](guide-container.html)
17+
[Tasks and Communication](guide-tasks.html)
18+
[Foreign Function Interface](guide-ffi.html)
19+
[Macros](guide-macros.html)
20+
[Packaging](guide-rustpkg.html)
21+
[Testing](guide-testing.html)
22+
[Conditions](guide-conditions.html)
2323

2424
# Libraries
2525

26-
[std](std/index.html)
27-
[extra](extra/index.html)
28-
[green](green/index.html)
29-
[native](native/index.html)
30-
[syntax](syntax/index.html)
31-
[rustc](rustc/index.html)
26+
[The standard library, `libstd`](std/index.html)
27+
[The extra library, `libextra`](extra/index.html)
28+
29+
[The M:N runtime library, `libgreen`](green/index.html)
30+
[The 1:1 runtime library, `libnative`](native/index.html)
31+
32+
[The Rust parser, `libsyntax`](syntax/index.html)
33+
[The Rust compiler, `librustc`](rustc/index.html)
3234

3335
# Tooling
3436

35-
[The rustpkg manual](rustpkg.html)
37+
[The `rustpkg` manual](rustpkg.html)
3638

3739
# FAQs
3840

39-
[Language FAQ](complement-lang-faq.html)
40-
[Project FAQ](complement-project-faq.html)
41-
[Usage FAQ](complement-usage-faq.html)
42-
[Code cheatsheet](complement-cheatsheet.html) - "How do I do X?"
43-
[HOWTO submit a bug report](complement-bugreport.html)
41+
[Language FAQ](complement-lang-faq.html)
42+
[Project FAQ](complement-project-faq.html)
43+
[Usage FAQ](complement-usage-faq.html)
44+
[Code cheatsheet](complement-cheatsheet.html) - "How do I do X?"
45+
[How to submit a bug report](complement-bugreport.html)
4446

4547
# External resources
4648

47-
The Rust [IRC channel](http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust) - #rust on irc.mozilla.org
48-
The Rust community on [Reddit](http://reddit.com/r/rust)
49-
The Rust [wiki](http://github.com/mozilla/rust/wiki)
49+
The Rust [IRC channel](http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust) - `#rust` on irc.mozilla.org
50+
The Rust community on [Reddit](http://reddit.com/r/rust)
51+
The Rust [wiki](http://github.com/mozilla/rust/wiki)

0 commit comments

Comments
 (0)