Skip to content

Commit 4867051

Browse files
committed
readme: Add build and run instructions.
1 parent e0f7d8f commit 4867051

18 files changed

+52
-7
lines changed

README.md

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,35 @@
1-
# miri
1+
# Miri
22

3-
An experimental interpreter for [Rust][rust]'s [mid-level
4-
intermediate representation][mir] (MIR). This project is part of my course work
5-
for an undergraduate research course at the [University of Saskatchewan][usask].
3+
An experimental interpreter for [Rust][rust]'s [mid-level intermediate
4+
representation][mir] (MIR). This project began as a part of my course work for
5+
an undergraduate research course at the [University of Saskatchewan][usask].
66

7-
[rust]: https://www.rust-lang.org/
8-
[mir]: https://github.com/rust-lang/rfcs/blob/master/text/1211-mir.md
9-
[usask]: https://www.usask.ca/
7+
## Download Rust nightly
8+
9+
I currently recommend that you install [multirust][multirust] and then use it to
10+
install the current rustc nightly version that works with Miri:
11+
12+
```sh
13+
multirust update nightly-2016-04-05
14+
```
15+
16+
## Build
17+
18+
```sh
19+
multirust run nightly-2016-04-05 cargo build
20+
```
21+
22+
## Run a test
23+
24+
```sh
25+
multirust run nightly-2016-04-05 cargo run -- \
26+
--sysroot $HOME/.multirust/toolchains/nightly-2016-04-05
27+
test/filename.rs
28+
```
29+
30+
If you installed without using multirust, you'll need to adjust the command to
31+
run your cargo and set the `sysroot` to the directory where your rust compiler
32+
is installed (`$sysroot/bin/rustc` should be a valid path).
1033

1134
## License
1235

@@ -21,3 +44,8 @@ Licensed under either of
2144
Unless you explicitly state otherwise, any contribution intentionally submitted
2245
for inclusion in the work by you shall be dual licensed as above, without any
2346
additional terms or conditions.
47+
48+
[rust]: https://www.rust-lang.org/
49+
[mir]: https://github.com/rust-lang/rfcs/blob/master/text/1211-mir.md
50+
[usask]: https://www.usask.ca/
51+
[multirust]: https://github.com/brson/multirust

test/arrays.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![crate_type = "lib"]
12
#![feature(custom_attribute)]
23
#![allow(dead_code, unused_attributes)]
34

test/bools.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![crate_type = "lib"]
12
#![feature(custom_attribute)]
23
#![allow(dead_code, unused_attributes)]
34

test/c_enums.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![crate_type = "lib"]
12
#![feature(custom_attribute)]
23
#![allow(dead_code, unused_attributes)]
34

test/calls.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![crate_type = "lib"]
12
#![feature(custom_attribute)]
23
#![allow(dead_code, unused_attributes)]
34

test/closures.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![crate_type = "lib"]
12
#![feature(custom_attribute)]
23
#![allow(dead_code, unused_attributes)]
34

test/errors.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![crate_type = "lib"]
12
#![feature(custom_attribute)]
23
#![allow(dead_code, unused_attributes)]
34

test/heap.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![crate_type = "lib"]
12
#![feature(custom_attribute, box_syntax)]
23
#![allow(dead_code, unused_attributes)]
34

test/ints.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![crate_type = "lib"]
12
#![feature(custom_attribute)]
23
#![allow(dead_code, unused_attributes)]
34

test/loops.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![crate_type = "lib"]
12
#![feature(custom_attribute)]
23
#![allow(dead_code, unused_attributes)]
34

test/pointers.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![crate_type = "lib"]
12
#![feature(custom_attribute)]
23
#![allow(dead_code, unused_attributes)]
34

test/products.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![crate_type = "lib"]
12
#![feature(custom_attribute)]
23
#![allow(dead_code, unused_attributes)]
34

test/specialization.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![crate_type = "lib"]
12
#![feature(custom_attribute, specialization)]
23
#![allow(dead_code, unused_attributes)]
34

test/std.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![crate_type = "lib"]
12
#![feature(custom_attribute, box_syntax)]
23
#![allow(dead_code, unused_attributes)]
34

test/strings.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![crate_type = "lib"]
12
#![feature(custom_attribute)]
23
#![allow(dead_code, unused_attributes)]
34

test/sums.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![crate_type = "lib"]
12
#![feature(custom_attribute)]
23
#![allow(dead_code, unused_attributes)]
34

test/trivial.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![crate_type = "lib"]
12
#![feature(custom_attribute)]
23
#![allow(dead_code, unused_attributes)]
34

test/vecs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![crate_type = "lib"]
12
#![feature(custom_attribute)]
23
#![allow(dead_code, unused_attributes)]
34

0 commit comments

Comments
 (0)