feat: Enables nightly toolchain support

Adds support for the nightly Rust toolchain, enabling the `build-std` feature when detected. This allows building with `panic=abort` for smaller binaries.
This commit is contained in:
Nils Andreas Svee committed 2026-02-21 14:45:32 +07:00
1 parent 9c11f2ed3f
commit 83ee08052f
1 file changed
+14 -2
Vendored
+14 -2
View File
@@ -43,8 +43,20 @@ pipeline {
cat "$CARGO_HOME/config.toml"
echo "----------------------------------"
# 5. Build
cargo build --release
# 5. Check Toolchain & Build
# We grep for "nightly" in the version string (e.g., "rustc 1.95.0-nightly...")
if rustc -V | grep -q "nightly"; then
echo "Detected Nightly toolchain. Enabling '-Z build-std' to support panic=abort..."
# Ensure rust-src is installed (needed for build-std)
# We use '|| true' so it doesn't fail if already installed or network flakes
rustup component add rust-src || true
cargo build --release -Z build-std=std,panic_abort
else
echo "Detected Stable toolchain. Building with standard pre-compiled library..."
cargo build --release
fi
'''
}
}