]> git.lizzy.rs Git - rust.git/commitdiff
readme: Add build and run instructions.
authorScott Olson <scott@solson.me>
Wed, 13 Apr 2016 13:32:32 +0000 (07:32 -0600)
committerScott Olson <scott@solson.me>
Wed, 13 Apr 2016 13:32:32 +0000 (07:32 -0600)
18 files changed:
README.md
test/arrays.rs
test/bools.rs
test/c_enums.rs
test/calls.rs
test/closures.rs
test/errors.rs
test/heap.rs
test/ints.rs
test/loops.rs
test/pointers.rs
test/products.rs
test/specialization.rs
test/std.rs
test/strings.rs
test/sums.rs
test/trivial.rs
test/vecs.rs

index 4c591dff015e34ae4a1f2706c55994681cc3c6d7..25bb64af80c2e106e1b88e6b1fc84401cca90949 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,12 +1,35 @@
-# miri
+# Miri
 
-An experimental interpreter for [Rust][rust]'s [mid-level
-intermediate representation][mir] (MIR). This project is part of my course work
-for an undergraduate research course at the [University of Saskatchewan][usask].
+An experimental interpreter for [Rust][rust]'s [mid-level intermediate
+representation][mir] (MIR). This project began as a part of my course work for
+an undergraduate research course at the [University of Saskatchewan][usask].
 
-[rust]: https://www.rust-lang.org/
-[mir]: https://github.com/rust-lang/rfcs/blob/master/text/1211-mir.md
-[usask]: https://www.usask.ca/
+## Download Rust nightly
+
+I currently recommend that you install [multirust][multirust] and then use it to
+install the current rustc nightly version that works with Miri:
+
+```sh
+multirust update nightly-2016-04-05
+```
+
+## Build
+
+```sh
+multirust run nightly-2016-04-05 cargo build
+```
+
+## Run a test
+
+```sh
+multirust run nightly-2016-04-05 cargo run -- \
+  --sysroot $HOME/.multirust/toolchains/nightly-2016-04-05
+  test/filename.rs
+```
+
+If you installed without using multirust, you'll need to adjust the command to
+run your cargo and set the `sysroot` to the directory where your rust compiler
+is installed (`$sysroot/bin/rustc` should be a valid path).
 
 ## License
 
@@ -21,3 +44,8 @@ Licensed under either of
 Unless you explicitly state otherwise, any contribution intentionally submitted
 for inclusion in the work by you shall be dual licensed as above, without any
 additional terms or conditions.
+
+[rust]: https://www.rust-lang.org/
+[mir]: https://github.com/rust-lang/rfcs/blob/master/text/1211-mir.md
+[usask]: https://www.usask.ca/
+[multirust]: https://github.com/brson/multirust
index 835e09780fc489d3c21dc5a880624d7909073ccf..05925fa98cfb49ce81a4e8ff874f1bb74d5f5c3b 100644 (file)
@@ -1,3 +1,4 @@
+#![crate_type = "lib"]
 #![feature(custom_attribute)]
 #![allow(dead_code, unused_attributes)]
 
index f8e6c2d89d22ac6398a3100d31bbb3c7b72dd0b4..699409e17a4d6f0035fddce3c221df0bbbfd4240 100644 (file)
@@ -1,3 +1,4 @@
+#![crate_type = "lib"]
 #![feature(custom_attribute)]
 #![allow(dead_code, unused_attributes)]
 
index 190e82ac01c5efa9ca8f72f6f4135beefd0ce646..1da35d64b8409d7d8f0f9d6e783ad177be93e8cd 100644 (file)
@@ -1,3 +1,4 @@
+#![crate_type = "lib"]
 #![feature(custom_attribute)]
 #![allow(dead_code, unused_attributes)]
 
index 2cda1c3bddf1bd92a6c7255acc07d90fdeb95724..0e9199f969df8d62f94f5c118186fbb4f7beba1e 100644 (file)
@@ -1,3 +1,4 @@
+#![crate_type = "lib"]
 #![feature(custom_attribute)]
 #![allow(dead_code, unused_attributes)]
 
index bff172d45b47969750f1665cad73f48d9539b9ad..9b6e2966648777424b5a39bb80700e7880d29bea 100644 (file)
@@ -1,3 +1,4 @@
+#![crate_type = "lib"]
 #![feature(custom_attribute)]
 #![allow(dead_code, unused_attributes)]
 
index a488d7acb433fe2efc5b57dbe73eaa3bb40ef3b8..e123538f6ce0dc2fbe6235b973bd111dac2a20d4 100644 (file)
@@ -1,3 +1,4 @@
+#![crate_type = "lib"]
 #![feature(custom_attribute)]
 #![allow(dead_code, unused_attributes)]
 
index 05efc56f0f33e2a74e473e9118d41083e478f414..268b4121dcbdb2bea64f7ab219a17cf7a3f6b745 100644 (file)
@@ -1,3 +1,4 @@
+#![crate_type = "lib"]
 #![feature(custom_attribute, box_syntax)]
 #![allow(dead_code, unused_attributes)]
 
index 718fa17a741800ac25b03b465e26c2db38447643..b790afe3b54f1f8b6e1468275dcd6de81b7837e1 100644 (file)
@@ -1,3 +1,4 @@
+#![crate_type = "lib"]
 #![feature(custom_attribute)]
 #![allow(dead_code, unused_attributes)]
 
index b59c813a423e0fe674c02d1d6a5a597a02e72243..008c6e6ad82939581bbf78f9f21df43f1f79a1c3 100644 (file)
@@ -1,3 +1,4 @@
+#![crate_type = "lib"]
 #![feature(custom_attribute)]
 #![allow(dead_code, unused_attributes)]
 
index 9e7e217ec5c728a2d23a7e9cc758951b5ebeb0a8..ab1226c759b3ae85120c32ce8ccf8b10da8ff0b0 100644 (file)
@@ -1,3 +1,4 @@
+#![crate_type = "lib"]
 #![feature(custom_attribute)]
 #![allow(dead_code, unused_attributes)]
 
index ba72bfb52a70403c92274b41934271cefabde213..2fad1daae068a26eac32813906a4ad14a924a70f 100644 (file)
@@ -1,3 +1,4 @@
+#![crate_type = "lib"]
 #![feature(custom_attribute)]
 #![allow(dead_code, unused_attributes)]
 
index ac510ec4cb4da542c8140f7d4abc7c0aa3291c19..a7323431f4cc830d98e78e57e161aa2fcb3c551b 100644 (file)
@@ -1,3 +1,4 @@
+#![crate_type = "lib"]
 #![feature(custom_attribute, specialization)]
 #![allow(dead_code, unused_attributes)]
 
index 36f9ca6a1ff02a309358a425094ad02e9dbb88f4..55e801b93d03e7260f9ab6822a3a305fc4fa9b6d 100644 (file)
@@ -1,3 +1,4 @@
+#![crate_type = "lib"]
 #![feature(custom_attribute, box_syntax)]
 #![allow(dead_code, unused_attributes)]
 
index 7db84d35cd52f82411c27e8bd66a2ada0ad22fd2..6d27153aaa8978cae6dd579540522fe3cb7d51ef 100644 (file)
@@ -1,3 +1,4 @@
+#![crate_type = "lib"]
 #![feature(custom_attribute)]
 #![allow(dead_code, unused_attributes)]
 
index 67257050364c9d0da0cdb65c7bd4851f9606f0d3..209629eabbf8274ce0bbcf16e6a997e3ece97cb7 100644 (file)
@@ -1,3 +1,4 @@
+#![crate_type = "lib"]
 #![feature(custom_attribute)]
 #![allow(dead_code, unused_attributes)]
 
index 99a1ef06186a16a2228dcf282f0d9544a19a78b3..9761e94792950bfa748395fa2f977795a731b469 100644 (file)
@@ -1,3 +1,4 @@
+#![crate_type = "lib"]
 #![feature(custom_attribute)]
 #![allow(dead_code, unused_attributes)]
 
index a1894505fb9696fe4c4b2652fb5e49b7c1788bb5..63757947b0a1f6e0c8fdde66d861bbb3c300f841 100644 (file)
@@ -1,3 +1,4 @@
+#![crate_type = "lib"]
 #![feature(custom_attribute)]
 #![allow(dead_code, unused_attributes)]