From ce695a6889c9a91507394e215276cf07a4a45523 Mon Sep 17 00:00:00 2001 From: RVG|lory <87276663+LoryPelli@users.noreply.github.com> Date: Thu, 6 Apr 2023 18:52:13 +0200 Subject: [PATCH] Updated to `Rust 1.68.2` --- packages/rust/1.68.2/build.sh | 5 +++++ packages/rust/1.68.2/compile | 6 ++++++ packages/rust/1.68.2/environment | 5 +++++ packages/rust/1.68.2/run | 4 ++++ packages/rust/1.68.2/test.rs | 3 +++ 5 files changed, 23 insertions(+) create mode 100644 packages/rust/1.68.2/build.sh create mode 100644 packages/rust/1.68.2/compile create mode 100644 packages/rust/1.68.2/environment create mode 100644 packages/rust/1.68.2/run create mode 100644 packages/rust/1.68.2/test.rs diff --git a/packages/rust/1.68.2/build.sh b/packages/rust/1.68.2/build.sh new file mode 100644 index 0000000..bfd853f --- /dev/null +++ b/packages/rust/1.68.2/build.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +curl -OL "https://static.rust-lang.org/dist/rust-1.68.2-x86_64-unknown-linux-gnu.tar.gz" +tar xzvf rust-1.68.2-x86_64-unknown-linux-gnu.tar.gz +rm rust-1.68.2-x86_64-unknown-linux-gnu.tar.gz \ No newline at end of file diff --git a/packages/rust/1.68.2/compile b/packages/rust/1.68.2/compile new file mode 100644 index 0000000..0fe6d8f --- /dev/null +++ b/packages/rust/1.68.2/compile @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +# https://stackoverflow.com/questions/38041331/rust-compiler-cant-find-crate-for-std +# Rust compiler needs to find the stdlib to link against +rustc -o binary -L ${RUST_INSTALL_LOC}/rustc/lib -L ${RUST_INSTALL_LOC}/rust-std-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib "$@" +chmod +x binary \ No newline at end of file diff --git a/packages/rust/1.68.2/environment b/packages/rust/1.68.2/environment new file mode 100644 index 0000000..9306950 --- /dev/null +++ b/packages/rust/1.68.2/environment @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +# Put 'export' statements here for environment variables +export PATH=$PWD/rust-1.68.2-x86_64-unknown-linux-gnu/rustc/bin/:$PATH +export RUST_INSTALL_LOC=$PWD/rust-1.68.2-x86_64-unknown-linux-gnu \ No newline at end of file diff --git a/packages/rust/1.68.2/run b/packages/rust/1.68.2/run new file mode 100644 index 0000000..19702cb --- /dev/null +++ b/packages/rust/1.68.2/run @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +shift +./binary "$@" \ No newline at end of file diff --git a/packages/rust/1.68.2/test.rs b/packages/rust/1.68.2/test.rs new file mode 100644 index 0000000..5b9bca6 --- /dev/null +++ b/packages/rust/1.68.2/test.rs @@ -0,0 +1,3 @@ +fn main() { + println!("OK"); +} \ No newline at end of file