Skip to content

Commit eacd923

Browse files
octo-sts[bot]OddBloke
authored andcommitted
rust-1.88: updated
1 parent bb7634b commit eacd923

File tree

1 file changed

+171
-0
lines changed

1 file changed

+171
-0
lines changed

rust-1.88.yaml

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
package:
2+
name: rust-1.88
3+
version: "1.88.0"
4+
epoch: 0
5+
description: "Empowering everyone to build reliable and efficient software."
6+
copyright:
7+
- license: Apache-2.0 AND MIT
8+
resources:
9+
cpu: 16
10+
memory: 16Gi
11+
dependencies:
12+
runtime:
13+
- libLLVM-20
14+
provides:
15+
- rust=${{package.full-version}}
16+
17+
environment:
18+
contents:
19+
packages:
20+
- build-base
21+
- busybox
22+
- ca-certificates-bundle
23+
- clang-20
24+
- cmake
25+
- coreutils
26+
- curl-dev
27+
- file
28+
- libLLVM-20
29+
- libssh2-dev
30+
- libxml2-dev
31+
- llvm-20
32+
- llvm-20-dev
33+
- openssl-dev
34+
- patch
35+
- python3
36+
- rust~1.86
37+
- samurai
38+
- wasi-libc
39+
- xz-dev
40+
- zlib-dev
41+
42+
pipeline:
43+
- uses: fetch
44+
with:
45+
uri: https://static.rust-lang.org/dist/rustc-${{package.version}}-src.tar.xz
46+
expected-sha256: 0c1dcbb4f762513d021e1a282c0ac58c0a423642b3a6bf581cafb5414df4193e
47+
extract: false
48+
49+
- runs: |
50+
tar -xJf rustc-${{package.version}}-src.tar.xz
51+
rm rustc-${{package.version}}-src.tar.xz
52+
53+
- runs: |
54+
export CFLAGS="$CFLAGS -O2 -I/usr/lib/llvm-20/include"
55+
export CXXFLAGS="$CXXFLAGS -O2 -I/usr/lib/llvm-20/include"
56+
export OPENSSL_NO_VENDOR=1
57+
export RUST_BACKTRACE=1
58+
export ARCH=${{host.triplet.rust}}
59+
cd rustc-${{package.version}}-src
60+
61+
# Create a minimal config.toml with necessary options
62+
# This is needed because of upstream changes in Rust 1.87 that removed automatic config.toml creation
63+
cat > config.toml <<EOF
64+
[rust]
65+
deny-warnings = false
66+
EOF
67+
68+
./configure \
69+
--host="${ARCH}" \
70+
--target="${ARCH}" \
71+
--prefix="/usr" \
72+
--release-channel="stable" \
73+
--enable-local-rust \
74+
--local-rust-root="/usr" \
75+
--llvm-root="/usr/lib/llvm-20" \
76+
--llvm-config="/usr/lib/llvm-20/bin/llvm-config" \
77+
--disable-docs \
78+
--enable-extended \
79+
--tools="cargo,src,clippy,rustfmt,rustdoc" \
80+
--enable-llvm-link-shared \
81+
--enable-option-checking \
82+
--enable-locked-deps \
83+
--enable-profiler \
84+
--enable-vendor \
85+
--dist-compression-formats=gz \
86+
--python="python3" \
87+
--set="rust.musl-root=/usr" \
88+
--set="rust.codegen-units=1" \
89+
--set="rust.codegen-units-std=1" \
90+
--set="target.${ARCH}.musl-root=/usr" \
91+
--set="target.${ARCH}.crt-static=false" \
92+
--set="target.${ARCH}.musl-root=/usr" \
93+
--set="target.${ARCH}.crt-static=false"
94+
95+
- runs: |
96+
cd rustc-${{package.version}}-src
97+
sed 's|deny(warnings,|deny(|' -i src/bootstrap/src/lib.rs
98+
mkdir -p "${{targets.destdir}}/usr"
99+
unset CARGO_PROFILE_RELEASE_LTO
100+
unset CARGO_PROFILE_RELEASE_OPT_LEVEL
101+
unset CARGO_PROFILE_RELEASE_PANIC
102+
unset CARGO_PROFILE_RELEASE_CODEGEN_UNITS
103+
export CFLAGS="$CFLAGS -O2 -Iusr/include/llvm-20"
104+
export CXXFLAGS="$CXXFLAGS -O2 -I/usr/include/llvm-20"
105+
export OPENSSL_NO_VENDOR=1
106+
export RUST_BACKTRACE=1
107+
DESTDIR=${{targets.destdir}} python3 ./x.py install --jobs $(nproc)
108+
109+
- uses: strip
110+
111+
# delete uneeded files eg uninstalltion
112+
- runs: |
113+
rm ${{targets.destdir}}/usr/lib/rustlib/components
114+
rm ${{targets.destdir}}/usr/lib/rustlib/install.log
115+
rm ${{targets.destdir}}/usr/lib/rustlib/rust-installer-version
116+
rm ${{targets.destdir}}/usr/lib/rustlib/uninstall.sh
117+
rm ${{targets.destdir}}/usr/lib/rustlib/manifest-*
118+
119+
- name: ensure libraries are executable for melange SCA provides generation
120+
runs: |
121+
chmod +x ${{targets.destdir}}/usr/lib/*.so
122+
123+
update:
124+
enabled: true
125+
github:
126+
identifier: rust-lang/rust
127+
use-tag: true
128+
tag-filter: 1.88.
129+
130+
test:
131+
environment:
132+
contents:
133+
packages:
134+
- gcc
135+
- glibc-dev
136+
pipeline:
137+
- name: Verify rustc installation
138+
runs: |
139+
rustc --version || exit 1
140+
cargo --help
141+
cargo-clippy --version
142+
cargo-clippy --help
143+
cargo-fmt --version
144+
cargo-fmt --help
145+
clippy-driver --version
146+
clippy-driver --help
147+
rust-gdbgui --help
148+
rustc --help
149+
rustdoc --help
150+
rustfmt --version
151+
rustfmt --help
152+
- name: Verify cargo installation
153+
runs: |
154+
cargo --version || exit 1
155+
- name: Compile and run Hello World
156+
runs: |
157+
cat <<'EOF' > hello.rs
158+
fn main() {
159+
println!("Hello, World!");
160+
}
161+
EOF
162+
rustc hello.rs
163+
./hello | grep -q "Hello, World!" || exit 1
164+
- name: Cargo project creation and run
165+
runs: |
166+
cargo new hello_cargo --bin
167+
cd hello_cargo
168+
cargo run | grep -q "Hello, world!" || exit 1
169+
- name: Verify rustdoc installation
170+
runs: |
171+
rustdoc --version || exit 1

0 commit comments

Comments
 (0)