Skip to content

Commit d23e41c

Browse files
committed
pkg(rust-1.65.0): Added Rust 1.65.0
1 parent 961435b commit d23e41c

File tree

6 files changed

+35
-0
lines changed

6 files changed

+35
-0
lines changed

packages/rust/1.65.0/build.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
curl -OL "https://static.rust-lang.org/dist/rust-1.65.0-x86_64-unknown-linux-gnu.tar.gz"
4+
tar xzvf rust-1.65.0-x86_64-unknown-linux-gnu.tar.gz
5+
rm rust-1.65.0-x86_64-unknown-linux-gnu.tar.gz

packages/rust/1.65.0/compile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
# https://stackoverflow.com/questions/38041331/rust-compiler-cant-find-crate-for-std
4+
# Rust compiler needs to find the stdlib to link against
5+
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 "$@"
6+
chmod +x binary

packages/rust/1.65.0/environment

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
# Put 'export' statements here for environment variables
4+
export PATH=$PWD/rust-1.65.0-x86_64-unknown-linux-gnu/rustc/bin/:$PATH
5+
export RUST_INSTALL_LOC=$PWD/rust-1.65.0-x86_64-unknown-linux-gnu

packages/rust/1.65.0/metadata.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"language": "rust",
3+
"version": "1.65.0",
4+
"aliases": [
5+
"rs"
6+
]
7+
}

packages/rust/1.65.0/run

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
shift
4+
./binary "$@"

packages/rust/1.65.0/test.rs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
fn main() {
2+
println!("OK");
3+
4+
// 1.65.0 feature
5+
let _test = if let Some(t) = Some(1234) {
6+
t
7+
} else { unreachable!() };
8+
}

0 commit comments

Comments
 (0)