diff --git a/rust-toolchain.toml b/rust-toolchain.toml index a6f039d9a..343270f65 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2025-10-20" +channel = "nightly-2026-03-04" components = ["rustfmt", "rust-analyzer", "clippy"] diff --git a/skyscraper/bn254-multiplier/src/lib.rs b/skyscraper/bn254-multiplier/src/lib.rs index b8c33b089..454d01945 100644 --- a/skyscraper/bn254-multiplier/src/lib.rs +++ b/skyscraper/bn254-multiplier/src/lib.rs @@ -1,5 +1,4 @@ #![feature(portable_simd)] -#![feature(bigint_helper_methods)] //#![no_std] This crate can technically be no_std. However this requires // replacing StdFloat.mul_add with intrinsics. diff --git a/skyscraper/bn254-multiplier/src/rne/batched.rs b/skyscraper/bn254-multiplier/src/rne/batched.rs index 634cde91b..4b4697369 100644 --- a/skyscraper/bn254-multiplier/src/rne/batched.rs +++ b/skyscraper/bn254-multiplier/src/rne/batched.rs @@ -108,10 +108,7 @@ pub fn simd_sqr(v0_a: [u64; 4], v1_a: [u64; 4]) -> ([u64; 4], [u64; 4]) { /// limbs except the last one is 51 bits. The most significant limb can be /// larger than 51 bits as the input can be bigger 2^255-1. #[inline(always)] -fn redundant_carry(t: [Simd; N]) -> [Simd; N] -where - std::simd::LaneCount: std::simd::SupportedLaneCount, -{ +fn redundant_carry(t: [Simd; N]) -> [Simd; N] { let mut borrow = Simd::splat(0); let mut res = [Simd::splat(0); N]; for i in 0..t.len() - 1 { diff --git a/skyscraper/bn254-multiplier/src/rne/simd_utils.rs b/skyscraper/bn254-multiplier/src/rne/simd_utils.rs index 17157f105..3040a428b 100644 --- a/skyscraper/bn254-multiplier/src/rne/simd_utils.rs +++ b/skyscraper/bn254-multiplier/src/rne/simd_utils.rs @@ -14,7 +14,7 @@ use { }, std::{ array, - simd::{cmp::SimdPartialEq, LaneCount, SupportedLaneCount}, + simd::{cmp::SimdPartialEq, Select}, }, }; #[inline(always)] @@ -24,10 +24,7 @@ use { /// /// Warning: due to Rust's limitations this can not be a const function. /// Therefore check your dependency path as this will not be optimised out. -pub fn i2f(a: Simd) -> Simd -where - LaneCount: SupportedLaneCount, -{ +pub fn i2f(a: Simd) -> Simd { // This function has no target gating as we want to verify this function with // kani and proptest on a different platform than wasm @@ -95,10 +92,7 @@ pub fn transpose_simd_to_u256(limbs: [Simd; 4]) -> [[u64; 4]; 2] { /// Convert 4×64-bit to 5×51-bit limb representation. /// Input must fit in 255 bits; no runtime checking. #[inline(always)] -pub fn u256_to_u255_simd(limbs: [Simd; 4]) -> [Simd; 5] -where - LaneCount: SupportedLaneCount, -{ +pub fn u256_to_u255_simd(limbs: [Simd; 4]) -> [Simd; 5] { for lane in 0..N { debug_assert!(limbs[3][lane] & (1 << 63) == 0); } @@ -115,10 +109,7 @@ where /// Convert 5×51-bit back to 4×64-bit limb representation. #[inline(always)] -pub fn u255_to_u256_simd(limbs: [Simd; 5]) -> [Simd; 4] -where - LaneCount: SupportedLaneCount, -{ +pub fn u255_to_u256_simd(limbs: [Simd; 5]) -> [Simd; 4] { let [l0, l1, l2, l3, l4] = limbs; [ l0 | (l1 << 51), @@ -130,10 +121,7 @@ where /// Convert 5×51-bit to 4×64-bit with simultaneous division by 2. #[inline(always)] -pub fn u255_to_u256_shr_1_simd(limbs: [Simd; 5]) -> [Simd; 4] -where - LaneCount: SupportedLaneCount, -{ +pub fn u255_to_u256_shr_1_simd(limbs: [Simd; 5]) -> [Simd; 4] { let [l0, l1, l2, l3, l4] = limbs; [ (l0 >> 1) | (l1 << 50), diff --git a/skyscraper/bn254-multiplier/src/rtz/simd_utils.rs b/skyscraper/bn254-multiplier/src/rtz/simd_utils.rs index 144951ffa..1d6b220ed 100644 --- a/skyscraper/bn254-multiplier/src/rtz/simd_utils.rs +++ b/skyscraper/bn254-multiplier/src/rtz/simd_utils.rs @@ -10,7 +10,7 @@ use { Simd, }, }, - std::simd::StdFloat, + std::simd::{Select, StdFloat}, }; // -- [SIMD UTILS] diff --git a/skyscraper/core/src/lib.rs b/skyscraper/core/src/lib.rs index 912fd7a1a..565223df8 100644 --- a/skyscraper/core/src/lib.rs +++ b/skyscraper/core/src/lib.rs @@ -1,6 +1,5 @@ #![feature(portable_simd)] -#![feature(bigint_helper_methods)] -#![feature(cold_path)] +#![feature(const_unsigned_bigint_helpers)] pub mod arithmetic; pub mod bar;