Skip to content

Commit 101a61c

Browse files
authored
chore: upgrade rust-toolchain to nightly-2025-11-20 (#1214)
## Summary We want to upgrade the current toolchain to a new one (e.g. `nightly-2025-11-20`). However, the recent nightly toolchains already include this [PR](rust-lang/rust#144443) to introduce a breaking change s.t. the `target-pointer-width` in `ceno_rt/riscv32im-ceno-zkvm-elf.json` is integer rather than string. ### Additional changes With `nightly-2025-11-20`, the feature `panic_immediate_abort` is now a real panic strategy. Therefore we have to make changes in the script for cross building `rv32im` ELF.
1 parent c1970fa commit 101a61c

13 files changed

Lines changed: 102 additions & 68 deletions

File tree

.github/workflows/lints.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
components: rustfmt, clippy
2626
targets: riscv32im-unknown-none-elf
2727
# TODO: figure out way to keep this in sync with rust-toolchain.toml automatically
28-
toolchain: nightly-2025-08-18
28+
toolchain: nightly-2025-11-20
2929
- name: Cargo cache
3030
uses: actions/cache@v4
3131
with:

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
targets: riscv32im-unknown-none-elf
2626
# TODO: figure out way to keep this in sync with rust-toolchain.toml automatically
27-
toolchain: nightly-2025-08-18
27+
toolchain: nightly-2025-11-20
2828
- name: Cargo cache
2929
uses: actions/cache@v4
3030
with:

Cargo.lock

Lines changed: 71 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ceno_cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ gkr_iop = { path = "../gkr_iop" }
4646
mpcs.workspace = true
4747

4848
[build-dependencies]
49-
vergen-git2 = { version = "1", features = ["build", "cargo", "rustc", "emit_and_set"] }
49+
vergen-git2 = { version = "9.1.0", features = ["build", "cargo", "rustc", "emit_and_set"] }
5050

5151
[features]
5252
gpu = ["gkr_iop/gpu", "ceno_zkvm/gpu", "ceno_recursion/gpu", "dep:openvm-cuda-backend", "openvm-native-circuit/cuda"]

ceno_cli/src/utils.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,13 @@ pub fn search_workspace_root<P: AsRef<Path>>(path: P) -> anyhow::Result<PathBuf>
7878
pub fn get_rust_flags() -> String {
7979
const BASE_RUST_FLAGS: &[&str] = &[
8080
"-C",
81-
"panic=abort",
81+
"panic=immediate-abort",
8282
"-C",
8383
"link-arg=-Tmemory.x",
8484
"-C",
8585
"link-arg=-Tceno_link.x",
8686
"-Zlocation-detail=none",
87+
"-Zunstable-options",
8788
"-C",
8889
"passes=lower-atomic",
8990
"--cfg",
@@ -104,7 +105,7 @@ pub fn apply_cargo_build_std_args(command: &mut Command) {
104105
"-Z",
105106
"build-std=alloc,core,compiler_builtins,std,panic_abort,proc_macro",
106107
"-Z",
107-
"build-std-features=compiler-builtins-mem,panic_immediate_abort,default",
108+
"build-std-features=compiler-builtins-mem,default",
108109
];
109110
command.args(BASE_CARGO_ARGS);
110111
}

ceno_rt/riscv32im-ceno-zkvm-elf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
"singlethread": true,
2929
"target-c-int-width": 32,
3030
"target-endian": "little",
31-
"target-pointer-width": "32"
31+
"target-pointer-width": 32
3232
}

ceno_zkvm/src/bin/bitwise_keccak.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use ceno_zkvm::precompiles::{run_bitwise_keccakf, setup_bitwise_keccak_gkr_circuit};
2-
use clap::{Parser, command};
2+
use clap::Parser;
33
use ff_ext::GoldilocksExt2;
44
use itertools::Itertools;
55
use mpcs::BasefoldDefault;

ceno_zkvm/src/bin/lookup_keccak.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use ceno_zkvm::precompiles::{run_lookup_keccakf, setup_lookup_keccak_gkr_circuit};
2-
use clap::{Parser, command};
2+
use clap::Parser;
33
use ff_ext::GoldilocksExt2;
44
use itertools::Itertools;
55
use mpcs::BasefoldDefault;

ceno_zkvm/src/precompiles/lookup_keccakf.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ impl<E: ExtensionField> ProtocolBuilder<E> for KeccakLayout<E> {
389389
// iterator over split witnesses
390390
let mut rotation_witness = rotation_witness.iter();
391391

392+
#[allow(clippy::needless_range_loop)]
392393
for i in 0..5 {
393394
#[allow(clippy::needless_range_loop)]
394395
for j in 0..5 {

0 commit comments

Comments
 (0)