Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
components: rustfmt, clippy
targets: riscv32im-unknown-none-elf
# TODO: figure out way to keep this in sync with rust-toolchain.toml automatically
toolchain: nightly-2025-08-18
toolchain: nightly-2025-11-20
- name: Cargo cache
uses: actions/cache@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
targets: riscv32im-unknown-none-elf
# TODO: figure out way to keep this in sync with rust-toolchain.toml automatically
toolchain: nightly-2025-08-18
toolchain: nightly-2025-11-20
- name: Cargo cache
uses: actions/cache@v4
with:
Expand Down
5 changes: 3 additions & 2 deletions ceno_cli/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,13 @@ pub fn search_workspace_root<P: AsRef<Path>>(path: P) -> anyhow::Result<PathBuf>
pub fn get_rust_flags() -> String {
const BASE_RUST_FLAGS: &[&str] = &[
"-C",
"panic=abort",
"panic=immediate-abort",
"-C",
"link-arg=-Tmemory.x",
"-C",
"link-arg=-Tceno_link.x",
"-Zlocation-detail=none",
"-Zunstable-options",
"-C",
"passes=lower-atomic",
"--cfg",
Expand All @@ -104,7 +105,7 @@ pub fn apply_cargo_build_std_args(command: &mut Command) {
"-Z",
"build-std=alloc,core,compiler_builtins,std,panic_abort,proc_macro",
"-Z",
"build-std-features=compiler-builtins-mem,panic_immediate_abort,default",
"build-std-features=compiler-builtins-mem,default",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

panic_immediate_abort is default in nightly-2025-11-20.

];
command.args(BASE_CARGO_ARGS);
}
Expand Down
2 changes: 1 addition & 1 deletion ceno_rt/riscv32im-ceno-zkvm-elf.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
"singlethread": true,
"target-c-int-width": 32,
"target-endian": "little",
"target-pointer-width": "32"
"target-pointer-width": 32
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an integer rather than a string like target-c-int-width.

}
2 changes: 1 addition & 1 deletion ceno_zkvm/src/bin/bitwise_keccak.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ceno_zkvm::precompiles::{run_bitwise_keccakf, setup_bitwise_keccak_gkr_circuit};
use clap::{Parser, command};
use clap::Parser;
use ff_ext::GoldilocksExt2;
use itertools::Itertools;
use mpcs::BasefoldDefault;
Expand Down
2 changes: 1 addition & 1 deletion ceno_zkvm/src/bin/lookup_keccak.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ceno_zkvm::precompiles::{run_lookup_keccakf, setup_lookup_keccak_gkr_circuit};
use clap::{Parser, command};
use clap::Parser;
use ff_ext::GoldilocksExt2;
use itertools::Itertools;
use mpcs::BasefoldDefault;
Expand Down
1 change: 1 addition & 0 deletions ceno_zkvm/src/precompiles/lookup_keccakf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ impl<E: ExtensionField> ProtocolBuilder<E> for KeccakLayout<E> {
// iterator over split witnesses
let mut rotation_witness = rotation_witness.iter();

#[allow(clippy::needless_range_loop)]
for i in 0..5 {
#[allow(clippy::needless_range_loop)]
for j in 0..5 {
Expand Down
30 changes: 14 additions & 16 deletions ceno_zkvm/src/scheme/mock_prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -783,29 +783,27 @@ impl<'a, E: ExtensionField + Hash> MockProver<E> {
.collect();

// Count lookups infered from ConstraintSystem from all instances into lkm_from_cs.
for i in 0..selected_count {
for (arg0, arg1) in args_eval[0]
.iter()
.zip(args_eval[1].iter())
.take(selected_count)
{
match rom_type {
ROMType::Dynamic => {
lkm_from_cs.assert_dynamic_range(args_eval[0][i], args_eval[1][i]);
lkm_from_cs.assert_dynamic_range(*arg0, *arg1);
}
ROMType::DoubleU8 => {
lkm_from_cs.assert_double_u8(args_eval[0][i], args_eval[1][i]);
}
ROMType::And => {
lkm_from_cs.lookup_and_byte(args_eval[0][i], args_eval[1][i])
}
ROMType::Or => lkm_from_cs.lookup_or_byte(args_eval[0][i], args_eval[1][i]),
ROMType::Xor => {
lkm_from_cs.lookup_xor_byte(args_eval[0][i], args_eval[1][i])
}
ROMType::Ltu => {
lkm_from_cs.lookup_ltu_byte(args_eval[0][i], args_eval[1][i])
lkm_from_cs.assert_double_u8(*arg0, *arg1);
}
ROMType::And => lkm_from_cs.lookup_and_byte(*arg0, *arg1),
ROMType::Or => lkm_from_cs.lookup_or_byte(*arg0, *arg1),
ROMType::Xor => lkm_from_cs.lookup_xor_byte(*arg0, *arg1),
ROMType::Ltu => lkm_from_cs.lookup_ltu_byte(*arg0, *arg1),
ROMType::Pow => {
assert_eq!(args_eval[0][i], 2);
lkm_from_cs.lookup_pow2(args_eval[1][i])
assert_eq!(*arg0, 2);
lkm_from_cs.lookup_pow2(*arg1)
}
ROMType::Instruction => lkm_from_cs.fetch(args_eval[0][i] as u32),
ROMType::Instruction => lkm_from_cs.fetch(*arg0 as u32),
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion ceno_zkvm/src/uint/arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ mod tests {

#[test]
fn test_add_mul2() {
let witness_values: Vec<ArcMultilinearExtension<E>> = vec![
let witness_values: Vec<ArcMultilinearExtension<E>> = [
// alloc a = 1 + 1 * 2^16
vec![1, 1, 0, 0],
// alloc b = 2 + 1 * 2^16
Expand Down
7 changes: 5 additions & 2 deletions examples/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ build-std = [
]
build-std-features = [
"compiler-builtins-mem",
"panic_immediate_abort",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

panic_immediate_abort is default in nightly-2025-11-20.

"default",
]
panic-immediate-abort = true

[profile.dev]
panic = "abort"
panic = "immediate-abort"

[profile.release]
panic = "immediate-abort"

[build]
rustflags = [
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "nightly-2025-08-18"
channel = "nightly-2025-11-20"
targets = ["riscv32im-unknown-none-elf"]
# We need the sources for build-std.
components = ["rust-src"]
Loading