Skip to content

Commit 0cbe2b8

Browse files
committed
---
yaml --- r: 57215 b: refs/heads/try c: 1fc8a2f h: refs/heads/master i: 57213: a82e35d 57211: ddb3efe 57207: 5602a4c 57199: 6400abd 57183: 814e2d3 57151: 1034935 57087: f0c040f v: v3
1 parent c7c1f5c commit 0cbe2b8

File tree

526 files changed

+35227
-22509
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

526 files changed

+35227
-22509
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: c081ffbd1e845687202a975ea2e698b623e5722f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
5-
refs/heads/try: d314090b8549c6b1274d436a652c7678259d4c76
5+
refs/heads/try: 1fc8a2f2a45c21247f6d0209ecb6349a2c20e453
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
.valgrindrc
5050
lexer.ml
5151
TAGS
52+
TAGS.emacs
53+
TAGS.vim
5254
version.ml
5355
version.texi
5456
/Makefile
@@ -60,6 +62,7 @@ config.mk
6062
/inst/
6163
/mingw-build/
6264
src/.DS_Store
65+
/tmp/
6366
/stage0/
6467
/dl/
6568
/stage1/
@@ -75,9 +78,12 @@ version.md
7578
rust.tex
7679
keywords.md
7780
x86_64-apple-darwin/
81+
x86_64-unknown-linux-gnu/
82+
i686-unknown-linux-gnu/
7883
doc/core/
7984
tmp.*.rs
8085
config.stamp
8186
.DS_Store
8287
src/etc/dl
8388
.settings/
89+
build/

branches/try/.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "src/llvm"]
22
path = src/llvm
3-
url = git://github.com/brson/llvm.git
3+
url = https://github.com/brson/llvm.git
44
[submodule "src/libuv"]
55
path = src/libuv
6-
url = git://github.com/brson/libuv.git
6+
url = https://github.com/brson/libuv.git

branches/try/AUTHORS.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Bilal Husain <[email protected]>
3131
Bill Fallon <[email protected]>
3232
Brendan Eich <[email protected]>
3333
Brendan Zabarauskas <[email protected]>
34+
Brett Cannon <[email protected]>
3435
Brian Anderson <[email protected]>
3536
Brian J. Burg <[email protected]>
3637
Brian Leibig <[email protected]>
@@ -50,6 +51,7 @@ Dave Herman <[email protected]>
5051
David Forsythe <[email protected]>
5152
David Klein <[email protected]>
5253
David Rajchenbach-Teller <[email protected]>
54+
Diggory Hardy <[email protected]>
5355
Dimitri Krassovski <[email protected]>
5456
Donovan Preston <[email protected]>
5557
Drew Willcoxon <[email protected]>
@@ -76,9 +78,11 @@ Ian D. Bollinger <[email protected]>
7678
Ilyong Cho <[email protected]>
7779
Isaac Aggrey <[email protected]>
7880
Ivano Coppola <[email protected]>
81+
Jack Moffitt <[email protected]>
7982
Jacob Harris Cryer Kragh <[email protected]>
8083
Jacob Parker <[email protected]>
8184
Jakub Wieczorek <[email protected]>
85+
James Miller <[email protected]>
8286
Jason Orendorff <[email protected]>
8387
Jed Davis <[email protected]>
8488
Jeff Balogh <[email protected]>

branches/try/RELEASES.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
1+
Version 0.7 (July 2013)
2+
-----------------------
3+
4+
* ??? changes, numerous bugfixes
5+
6+
* Semantic changes
7+
* The `self` parameter no longer implicitly means `&'self self`, and can be explicitly marked
8+
with a lifetime.
9+
10+
* Libraries
11+
* New `core::iterator` module for external iterator objects
12+
113
Version 0.6 (April 2013)
2-
---------------------------
14+
------------------------
315

416
* ~2100 changes, numerous bugfixes
517

branches/try/configure

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ need_cmd uname
237237
need_cmd date
238238
need_cmd tr
239239
need_cmd sed
240-
240+
need_cmd file
241241

242242
msg "inspecting environment"
243243

@@ -533,7 +533,7 @@ then
533533
LLVM_VERSION=$($LLVM_CONFIG --version)
534534

535535
case $LLVM_VERSION in
536-
(3.2svn|3.2|3.1svn|3.1|3.0svn|3.0)
536+
(3.3|3.3svn|3.2|3.2svn)
537537
msg "found ok version of LLVM: $LLVM_VERSION"
538538
;;
539539
(*)
@@ -859,7 +859,7 @@ do
859859
LDFLAGS=$LLVM_LDFLAGS
860860

861861
LLVM_FLAGS="$LLVM_TARGETS $LLVM_OPTS $LLVM_BUILD \
862-
$LLVM_HOST $LLVM_TARGET"
862+
$LLVM_HOST $LLVM_TARGET --with-python=$CFG_PYTHON"
863863

864864
msg "configuring LLVM with:"
865865
msg "$LLVM_FLAGS"

branches/try/doc/rust.md

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,10 @@ expression context, the final namespace qualifier is omitted.
441441
Two examples of paths with type arguments:
442442

443443
~~~~
444-
# use core::hashmap::linear::LinearMap;
444+
# use core::hashmap::HashMap;
445445
# fn f() {
446446
# fn id<T:Copy>(t: T) -> T { t }
447-
type t = LinearMap<int,~str>; // Type arguments used in a type expression
447+
type t = HashMap<int,~str>; // Type arguments used in a type expression
448448
let x = id::<int>(10); // Type arguments used in a call expression
449449
# }
450450
~~~~
@@ -802,7 +802,7 @@ An example of `use` declarations:
802802

803803
~~~~
804804
use core::float::sin;
805-
use core::str::{slice, to_upper};
805+
use core::str::{slice, contains};
806806
use core::option::Some;
807807
808808
fn main() {
@@ -813,8 +813,8 @@ fn main() {
813813
info!(Some(1.0));
814814
815815
// Equivalent to
816-
// 'info!(core::str::to_upper(core::str::slice("foo", 0, 1)));'
817-
info!(to_upper(slice("foo", 0, 1)));
816+
// 'info!(core::str::contains(core::str::slice("foo", 0, 1), "oo"));'
817+
info!(contains(slice("foo", 0, 1), "oo"));
818818
}
819819
~~~~
820820

@@ -1467,10 +1467,10 @@ A complete list of the built-in language items follows:
14671467
: Elements can be subtracted.
14681468
`mul`
14691469
: Elements can be multiplied.
1470-
`div`
1471-
: Elements can be divided.
1472-
`mod`
1473-
: Elements have a modulo operation.
1470+
`quot`
1471+
: Elements have a quotient operation.
1472+
`rem`
1473+
: Elements have a remainder operation.
14741474
`neg`
14751475
: Elements can be negated arithmetically.
14761476
`not`
@@ -1653,11 +1653,12 @@ Path expressions are [lvalues](#lvalues-rvalues-and-temporaries).
16531653

16541654
### Tuple expressions
16551655

1656-
Tuples are written by enclosing two or more comma-separated
1656+
Tuples are written by enclosing one or more comma-separated
16571657
expressions in parentheses. They are used to create [tuple-typed](#tuple-types)
16581658
values.
16591659

16601660
~~~~~~~~ {.tuple}
1661+
(0,);
16611662
(0f, 4.5f);
16621663
("a", 4u, true);
16631664
~~~~~~~~
@@ -1855,11 +1856,11 @@ The default meaning of the operators on standard types is given here.
18551856
: Multiplication.
18561857
Calls the `mul` method on the `core::ops::Mul` trait.
18571858
`/`
1858-
: Division.
1859-
Calls the `div` method on the `core::ops::Div` trait.
1859+
: Quotient.
1860+
Calls the `quot` method on the `core::ops::Quot` trait.
18601861
`%`
1861-
: Modulo (a.k.a. "remainder").
1862-
Calls the `modulo` method on the `core::ops::Modulo` trait.
1862+
: Remainder.
1863+
Calls the `rem` method on the `core::ops::Rem` trait.
18631864

18641865
#### Bitwise operators
18651866

@@ -2578,7 +2579,7 @@ to the record type-constructor. The differences are as follows:
25782579

25792580
Tuple types and values are denoted by listing the types or values of their
25802581
elements, respectively, in a parenthesized, comma-separated
2581-
list. Single-element tuples are not legal; all tuples have two or more values.
2582+
list.
25822583

25832584
The members of a tuple are laid out in memory contiguously, like a record, in
25842585
order specified by the tuple type.
@@ -3251,6 +3252,28 @@ of runtime logging modules follows.
32513252
* `::rt::backtrace` Log a backtrace on task failure
32523253
* `::rt::callback` Unused
32533254

3255+
#### Logging Expressions
3256+
3257+
Rust provides several macros to log information. Here's a simple Rust program
3258+
that demonstrates all four of them:
3259+
3260+
```rust
3261+
fn main() {
3262+
error!("This is an error log")
3263+
warn!("This is a warn log")
3264+
info!("this is an info log")
3265+
debug!("This is a debug log")
3266+
}
3267+
```
3268+
3269+
These four log levels correspond to levels 1-4, as controlled by `RUST_LOG`:
3270+
3271+
```bash
3272+
$ RUST_LOG=rust=3 ./rust
3273+
rust: ~"\"This is an error log\""
3274+
rust: ~"\"This is a warn log\""
3275+
rust: ~"\"this is an info log\""
3276+
```
32543277

32553278
# Appendix: Rationales and design tradeoffs
32563279

branches/try/doc/rustpkg.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
% Rustpkg Reference Manual
2+
3+
# Introduction
4+
5+
This document is the reference manual for the Rustpkg packaging and build tool for the Rust programming language.
6+
7+
## Disclaimer
8+
9+
Rustpkg is a work in progress, as is this reference manual.
10+
If the actual behavior of rustpkg differs from the behavior described in this reference,
11+
that reflects either an incompleteness or a bug in rustpkg.
12+
13+
# Package searching
14+
15+
rustpkg searches for packages using the `RUST_PATH` environment variable,
16+
which is a colon-separated list (semicolon-separated on Windows) of directories.
17+
18+
Each directory in this list is a *workspace* for rustpkg.
19+
20+
`RUST_PATH` implicitly contains an entry for `./.rust` (as well as
21+
`../.rust`, `../../.rust`,
22+
and so on for every parent of `.` up to the filesystem root).
23+
That means that if `RUST_PATH` is not set,
24+
then rustpkg will still search for workspaces in `./.rust` and so on.
25+
`RUST_PATH` also implicitly contains an entry for the system path:
26+
`/usr/local` or the equivalent on Windows.
27+
This entry comes after the implicit entries for `./.rust` and so on.
28+
Finally, the last implicit entry in `RUST_PATH` is `~/.rust`
29+
or the equivalent on Windows.
30+
31+
Each workspace may contain one or more packages.
32+
33+
# Package structure
34+
35+
A valid workspace must contain each of the following subdirectories:
36+
37+
* 'src/': contains one subdirectory per package. Each subdirectory contains source files for a given package.
38+
39+
For example, if `foo` is a workspace containing the package `bar`,
40+
then `foo/src/bar/main.rs` could be the `main` entry point for
41+
building a `bar` executable.
42+
* 'lib/': `rustpkg install` installs libraries into a target-specific subdirectory of this directory.
43+
44+
For example, on a 64-bit machine running Mac OS X,
45+
if `foo` is a workspace containing the package `bar`,
46+
rustpkg will install libraries for bar to `foo/lib/x86_64-apple-darwin/`.
47+
The libraries will have names of the form `foo/lib/x86_64-apple-darwin/libbar-[hash].dylib`,
48+
where [hash] is a hash of the package ID.
49+
* 'bin/': `rustpkg install` installs executable binaries into a target-specific subdirectory of this directory.
50+
51+
For example, on a 64-bit machine running Mac OS X,
52+
if `foo` is a workspace, containing the package `bar`,
53+
rustpkg will install executables for `bar` to
54+
`foo/bin/x86_64-apple-darwin/`.
55+
The executables will have names of the form `foo/bin/x86_64-apple-darwin/bar`.
56+
* 'build/': `rustpkg build` stores temporary build artifacts in a target-specific subdirectory of this directory.
57+
58+
For example, on a 64-bit machine running Mac OS X,
59+
if `foo` is a workspace containing the package `bar` and `foo/src/bar/main.rs` exists,
60+
then `rustpkg build` will create `foo/build/x86_64-apple-darwin/bar/main.o`.
61+
62+
# Package identifiers
63+
64+
A package identifier identifies a package uniquely.
65+
A package can be stored in a workspace on the local file system,
66+
or on a remote Web server, in which case the package ID resembles a URL.
67+
For example, `github.com/mozilla/rust` is a package ID
68+
that would refer to the git repository browsable at `http://github.com/mozilla/rust`.
69+
70+
## Source files
71+
72+
rustpkg searches for four different fixed filenames in order to determine the crates to build:
73+
74+
* `main.rs`: Assumed to be a main entry point for building an executable.
75+
* `lib.rs`: Assumed to be a library crate.
76+
* `test.rs`: Assumed to contain tests declared with the `#[test]` attribute.
77+
* `bench.rs`: Assumed to contain benchmarks declared with the `#[bench]` attribute.
78+
79+
# Custom build scripts
80+
81+
A file called `pkg.rs` at the root level in a workspace is called a *package script*.
82+
If a package script exists, rustpkg executes it to build the package
83+
rather than inferring crates as described previously.
84+
85+
# Command reference
86+
87+
## build
88+
89+
`rustpkg build foo` searches for a package with ID `foo`
90+
and builds it in any workspace(s) where it finds one.
91+
Supposing such packages are found in workspaces X, Y, and Z,
92+
the command leaves behind files in `X`'s, `Y`'s, and `Z`'s `build` directories,
93+
but not in their `lib` or `bin` directories.
94+
95+
## clean
96+
97+
`rustpkg clean foo` deletes the contents of `foo`'s `build` directory.
98+
99+
## install
100+
101+
`rustpkg install foo` builds the libraries and/or executables that are targets for `foo`,
102+
and then installs them either into `foo`'s `lib` and `bin` directories,
103+
or into the `lib` and `bin` subdirectories of the first entry in `RUST_PATH`.
104+
105+
## test
106+
107+
`rustpkg test foo` builds `foo`'s `test.rs` file if necessary,
108+
then runs the resulting test executable.

0 commit comments

Comments
 (0)