From f0ba0abade539833f2b8dd266bd721d8e1e5b8c1 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Wed, 12 Aug 2020 12:59:19 -0400 Subject: [PATCH 1/2] Add rustup First let me say I have no idea if this is the right way to do this, so any help here is appreciated. I'm trying to compete in the programming languages jam, but I can't get past configuring the environment. I need Rust nightly for some features that the installed version does not support yet. I'd like to use the rustup tool to switch versions, or even better be able to specify the version of Rust I want to use for my repl. It seems like everything I've tried so far gets reset when I visit my repl again. Really hoping to find a way around this because I've burned 2 days of the jam already on this issue and I haven't even started coding yet! Thanks for any help and tips you can provide. --- languages/rust.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/languages/rust.toml b/languages/rust.toml index 387339f5..9e600f76 100644 --- a/languages/rust.toml +++ b/languages/rust.toml @@ -7,6 +7,7 @@ packages = [ "rust-gdb" ] setup = [ + "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh", "curl --proto '=https' --tlsv1.2 -Sf https://static.rust-lang.org/dist/rust-1.44.0-x86_64-unknown-linux-gnu.tar.gz | tar xz -C /tmp", "/tmp/rust-1.44.0-x86_64-unknown-linux-gnu/install.sh", "rm -rf /tmp/rust-1.44.0-x86_64-unknown-linux-gnu" From 3ed0162a831a9259e103c63940115f53494e16d1 Mon Sep 17 00:00:00 2001 From: Corey Montella Date: Wed, 12 Aug 2020 14:15:50 -0400 Subject: [PATCH 2/2] Create rust_nightly.toml --- languages/rust_nightly.toml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 languages/rust_nightly.toml diff --git a/languages/rust_nightly.toml b/languages/rust_nightly.toml new file mode 100644 index 00000000..d583ed1e --- /dev/null +++ b/languages/rust_nightly.toml @@ -0,0 +1,31 @@ +name = "rust_nightly" +entrypoint = "main.rs" +extensions = [ + "rs" +] +packages = [ + "rust-gdb" +] +setup = [ + "curl --proto '=https' --tlsv1.2 -Sf https://static.rust-lang.org/dist/2020-08-11/rust-nightly-x86_64-unknown-linux-gnu.tar.gz | tar xz -C /tmp", + "/tmp/rust-nightly-x86_64-unknown-linux-gnu/install.sh", + "rm -rf /tmp/rust-nightly-x86_64-unknown-linux-gnu" +] + +[compile] +command = [ + "rustc", + "-o", + "main" +] + +[run] +command = [ + "./main" +] + +[tests] + + [tests.hello] + code = "fn main() {\n println!(\"hello\");\n}" + output = "hello\n"