diff --git a/.cargo/config.toml b/.cargo/config.toml index 45a5593f6..14e296551 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -5,3 +5,6 @@ xtask = "run --manifest-path=crates/xtask/Cargo.toml --" [build] target-dir = "target" + +[unstable] +panic-immediate-abort = true diff --git a/crates/api/CHANGELOG.md b/crates/api/CHANGELOG.md index dbdff1c1a..0ad326015 100644 --- a/crates/api/CHANGELOG.md +++ b/crates/api/CHANGELOG.md @@ -128,4 +128,4 @@ ## 0.1.0 - + diff --git a/crates/api/src/lib.rs b/crates/api/src/lib.rs index 468ffdd2e..a6b96f49b 100644 --- a/crates/api/src/lib.rs +++ b/crates/api/src/lib.rs @@ -19,7 +19,7 @@ #![no_std] #![cfg_attr(all(feature = "wasm", feature = "native"), feature(linkage))] #![cfg_attr(feature = "host", feature(never_type))] -#![feature(doc_auto_cfg)] +#![feature(doc_cfg)] extern crate alloc; diff --git a/crates/board/CHANGELOG.md b/crates/board/CHANGELOG.md index 43b1144ef..5cec8a6a6 100644 --- a/crates/board/CHANGELOG.md +++ b/crates/board/CHANGELOG.md @@ -211,4 +211,4 @@ ## 0.1.0 - + diff --git a/crates/board/src/lib.rs b/crates/board/src/lib.rs index 7a78db87b..a21f3bc97 100644 --- a/crates/board/src/lib.rs +++ b/crates/board/src/lib.rs @@ -18,7 +18,7 @@ //! support triggering [events][Event]. #![no_std] -#![feature(doc_auto_cfg)] +#![feature(doc_cfg)] #![feature(never_type)] extern crate alloc; diff --git a/crates/cli-tools/CHANGELOG.md b/crates/cli-tools/CHANGELOG.md index 4b49dc247..ed49bd899 100644 --- a/crates/cli-tools/CHANGELOG.md +++ b/crates/cli-tools/CHANGELOG.md @@ -4,6 +4,7 @@ ### Minor +- Use the `immediate-abort` panic strategy instead of `build-std-features` - Test in `changelog::execute_ci()` that skip counter is zero for releases ### Patch diff --git a/crates/cli-tools/src/action.rs b/crates/cli-tools/src/action.rs index 9c6402289..fd0afcc3c 100644 --- a/crates/cli-tools/src/action.rs +++ b/crates/cli-tools/src/action.rs @@ -714,11 +714,10 @@ impl RustAppletBuild { cargo.arg("-Zbuild-std=core,alloc"); // TODO(https://github.com/rust-lang/rust/issues/122105): Remove when fixed. rustflags.push("--allow=unused-crate-dependencies".to_string()); - let mut features = "-Zbuild-std-features=panic_immediate_abort".to_string(); if self.opt_level.is_some_and(OptLevel::optimize_for_size) { - features.push_str(",optimize_for_size"); + cargo.arg("-Zbuild-std-features=optimize_for_size"); } - cargo.arg(features); + cargo.arg(format!("--config=profile.{profile}.panic=\"immediate-abort\"")); } else { cargo.env("WASEFIRE_DEBUG", ""); } diff --git a/crates/cli-tools/src/lib.rs b/crates/cli-tools/src/lib.rs index 254b8abaa..ec68be173 100644 --- a/crates/cli-tools/src/lib.rs +++ b/crates/cli-tools/src/lib.rs @@ -17,9 +17,8 @@ //! This library is also used for the internal maintenance CLI of Wasefire called xtask. #![feature(async_fn_track_caller)] -#![feature(doc_auto_cfg)] +#![feature(doc_cfg)] #![feature(never_type)] -#![feature(path_add_extension)] #![feature(try_blocks)] #![feature(try_find)] diff --git a/crates/prelude/CHANGELOG.md b/crates/prelude/CHANGELOG.md index ddc92a147..c76084e49 100644 --- a/crates/prelude/CHANGELOG.md +++ b/crates/prelude/CHANGELOG.md @@ -215,4 +215,4 @@ ## 0.1.0 - + diff --git a/crates/prelude/src/lib.rs b/crates/prelude/src/lib.rs index 17a0dbf49..41bbc133f 100644 --- a/crates/prelude/src/lib.rs +++ b/crates/prelude/src/lib.rs @@ -28,7 +28,7 @@ #![no_std] #![feature(alloc_error_handler)] -#![feature(doc_auto_cfg)] +#![feature(doc_cfg)] #![feature(macro_metavar_expr)] #![feature(maybe_uninit_array_assume_init)] #![feature(negative_impls)] diff --git a/crates/protocol/CHANGELOG.md b/crates/protocol/CHANGELOG.md index 47f476aa4..caeb6dcd7 100644 --- a/crates/protocol/CHANGELOG.md +++ b/crates/protocol/CHANGELOG.md @@ -56,4 +56,4 @@ ## 0.1.0 - + diff --git a/crates/protocol/src/lib.rs b/crates/protocol/src/lib.rs index 890304757..6c6ca6134 100644 --- a/crates/protocol/src/lib.rs +++ b/crates/protocol/src/lib.rs @@ -27,7 +27,7 @@ //! and cancel the request it was processing if any. #![no_std] -#![feature(doc_auto_cfg)] +#![feature(doc_cfg)] #![feature(macro_metavar_expr)] #![feature(never_type)] diff --git a/crates/wire/CHANGELOG.md b/crates/wire/CHANGELOG.md index 52f45d592..f25d8b8c1 100644 --- a/crates/wire/CHANGELOG.md +++ b/crates/wire/CHANGELOG.md @@ -32,4 +32,4 @@ ## 0.1.0 - + diff --git a/crates/wire/src/lib.rs b/crates/wire/src/lib.rs index 5c0523927..a83ccc72c 100644 --- a/crates/wire/src/lib.rs +++ b/crates/wire/src/lib.rs @@ -36,7 +36,7 @@ #![no_std] #![feature(array_try_from_fn)] -#![feature(doc_auto_cfg)] +#![feature(doc_cfg)] #![feature(never_type)] #![feature(try_blocks)] diff --git a/crates/xtask/src/main.rs b/crates/xtask/src/main.rs index 2340b6579..279016f47 100644 --- a/crates/xtask/src/main.rs +++ b/crates/xtask/src/main.rs @@ -736,13 +736,12 @@ impl RunnerOptions { cargo.arg("-Zbuild-std=core,alloc"); // TODO(https://github.com/rust-lang/rust/issues/122105): Remove when fixed. rustflags.push("--allow=unused-crate-dependencies".to_string()); - let mut features = "-Zbuild-std-features=panic_immediate_abort".to_string(); if self.opt_level.is_some_and(action::OptLevel::optimize_for_size) { - features.push_str(",optimize_for_size"); + cargo.arg("-Zbuild-std-features=optimize_for_size"); } - cargo.arg(features); cargo.arg("--config=profile.release.codegen-units=1"); cargo.arg("--config=profile.release.lto=true"); + cargo.arg("--config=profile.release.panic=\"immediate-abort\""); } else { cargo.arg("--config=profile.release.debug=2"); rustflags.push("-C link-arg=-Tdefmt.x".to_string()); @@ -930,7 +929,7 @@ impl RunnerOptions { if self.single_sided { cargo.arg("--features=single-sided"); } - cargo.args(["-Zbuild-std=core", "-Zbuild-std-features=panic_immediate_abort"]); + cargo.args(["-Zbuild-std=core", "--config=profile.release.panic=\"immediate-abort\""]); // TODO(https://github.com/rust-lang/rust/issues/122105): Remove when fixed. cargo.env("RUSTFLAGS", "--allow=unused-crate-dependencies"); cmd::execute(&mut cargo).await?; diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 67979cd8b..c5da9feae 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2025-09-02" +channel = "nightly-2025-10-07" components = ["clippy", "llvm-tools", "miri", "rust-src", "rustfmt"] targets = [ "i686-unknown-linux-gnu",