Fix Rust nightly builds (#668)

`panic_immediate_abort` is being stablized as `panic = immediate-abort`
(yay!).
See: https://github.com/rust-lang/rust/issues/147286

Closes #657
This commit is contained in:
Leonard Hecker 2025-10-14 19:53:51 +02:00 committed by GitHub
parent c557cdbf04
commit 67c401648f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,16 @@
[profile.release]
panic = "immediate-abort"
[target.'cfg(all(target_os = "windows", target_env = "msvc"))']
rustflags = [
"-Ctarget-feature=+crt-static",
"-Clink-args=/DEFAULTLIB:ucrt.lib",
"-Clink-args=/NODEFAULTLIB:vcruntime.lib",
"-Clink-args=/NODEFAULTLIB:msvcrt.lib",
"-Clink-args=/NODEFAULTLIB:libucrt.lib",
]
[unstable]
panic-immediate-abort = true
build-std = ["std", "panic_abort"]
build-std-features = ["default", "optimize_for_size"]

View File

@ -25,7 +25,9 @@ winget install Microsoft.Edit
* Install the nightly toolchain: `rustup install nightly` * Install the nightly toolchain: `rustup install nightly`
* Alternatively, set the environment variable `RUSTC_BOOTSTRAP=1` * Alternatively, set the environment variable `RUSTC_BOOTSTRAP=1`
* Clone the repository * Clone the repository
* For a release build, run: `cargo build --config .cargo/release.toml --release` * For a release build, run:
* Rust 1.90 or earlier: `cargo build --config .cargo/release.toml --release`
* otherwise: `cargo build --config .cargo/release-nightly.toml --release`
### Build Configuration ### Build Configuration