From 219c43ed3ac62ebda543add2b696fabff02632a1 Mon Sep 17 00:00:00 2001 From: muraca Date: Mon, 6 Nov 2023 23:26:02 +0100 Subject: [PATCH 1/8] perform test action on `x86_64-unknown-linux-gnu` and `wasm32-unknown-unknown` Signed-off-by: muraca --- .github/workflows/continuous-integration-workflow.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index a0ac3ec727..2b42dba03e 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -10,11 +10,14 @@ on: branches: - "**" -jobs: +jobs: test: name: Test Suite runs-on: ubuntu-latest if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')" + strategy: + matrix: + target: [x86_64-unknown-linux-gnu, wasm32-unknown-unknown] steps: - name: Checkout sources uses: actions/checkout@v2 @@ -25,6 +28,7 @@ jobs: with: profile: minimal toolchain: nightly + target: ${{ matrix.target }} override: true - name: rust-cache From 01eea03edb052155771ead9d4ef6b3b35d4c77a0 Mon Sep 17 00:00:00 2001 From: muraca Date: Mon, 6 Nov 2023 23:27:06 +0100 Subject: [PATCH 2/8] make `plonky2` build on `wasm32-unknown-unknown` Signed-off-by: muraca --- plonky2/src/gadgets/arithmetic.rs | 1 + plonky2/src/gadgets/arithmetic_extension.rs | 1 + plonky2/src/gadgets/lookup.rs | 3 +++ plonky2/src/gadgets/range_check.rs | 1 + plonky2/src/gadgets/split_base.rs | 1 + plonky2/src/gadgets/split_join.rs | 1 + plonky2/src/gates/arithmetic_base.rs | 2 +- plonky2/src/gates/arithmetic_extension.rs | 2 +- plonky2/src/gates/base_sum.rs | 2 +- plonky2/src/gates/coset_interpolation.rs | 6 ++---- plonky2/src/gates/exponentiation.rs | 2 +- plonky2/src/gates/lookup.rs | 4 ++-- plonky2/src/gates/lookup_table.rs | 4 ++-- plonky2/src/gates/multiplication_extension.rs | 2 +- plonky2/src/gates/poseidon.rs | 2 +- plonky2/src/gates/poseidon_mds.rs | 2 +- plonky2/src/gates/random_access.rs | 2 +- plonky2/src/gates/reducing.rs | 2 +- plonky2/src/gates/reducing_extension.rs | 2 +- plonky2/src/hash/hashing.rs | 9 ++++----- plonky2/src/hash/keccak.rs | 3 +-- plonky2/src/hash/merkle_proofs.rs | 2 +- plonky2/src/hash/poseidon.rs | 2 +- plonky2/src/iop/challenger.rs | 4 ++-- plonky2/src/iop/generator.rs | 2 ++ plonky2/src/lib.rs | 2 +- plonky2/src/recursion/cyclic_recursion.rs | 2 ++ plonky2/src/recursion/dummy_circuit.rs | 1 + plonky2/src/util/serialization/gate_serialization.rs | 10 +++++++++- .../src/util/serialization/generator_serialization.rs | 8 +++++++- plonky2/src/util/serialization/mod.rs | 2 +- 31 files changed, 56 insertions(+), 33 deletions(-) diff --git a/plonky2/src/gadgets/arithmetic.rs b/plonky2/src/gadgets/arithmetic.rs index 858a4eaf07..e3af60e9c5 100644 --- a/plonky2/src/gadgets/arithmetic.rs +++ b/plonky2/src/gadgets/arithmetic.rs @@ -1,3 +1,4 @@ +use alloc::string::{String, ToString}; use alloc::vec; use alloc::vec::Vec; use core::borrow::Borrow; diff --git a/plonky2/src/gadgets/arithmetic_extension.rs b/plonky2/src/gadgets/arithmetic_extension.rs index 0fe8083aa3..3c1deac381 100644 --- a/plonky2/src/gadgets/arithmetic_extension.rs +++ b/plonky2/src/gadgets/arithmetic_extension.rs @@ -1,3 +1,4 @@ +use alloc::string::{String, ToString}; use alloc::vec; use alloc::vec::Vec; use core::borrow::Borrow; diff --git a/plonky2/src/gadgets/lookup.rs b/plonky2/src/gadgets/lookup.rs index 826f3e2902..4ab765ba03 100644 --- a/plonky2/src/gadgets/lookup.rs +++ b/plonky2/src/gadgets/lookup.rs @@ -1,3 +1,6 @@ +use alloc::borrow::ToOwned; +use alloc::vec; + use crate::field::extension::Extendable; use crate::gates::lookup::LookupGate; use crate::gates::lookup_table::{LookupTable, LookupTableGate}; diff --git a/plonky2/src/gadgets/range_check.rs b/plonky2/src/gadgets/range_check.rs index bdb35f9edc..41af064aa6 100644 --- a/plonky2/src/gadgets/range_check.rs +++ b/plonky2/src/gadgets/range_check.rs @@ -1,3 +1,4 @@ +use alloc::string::{String, ToString}; use alloc::vec; use alloc::vec::Vec; diff --git a/plonky2/src/gadgets/split_base.rs b/plonky2/src/gadgets/split_base.rs index 0a39b8f00c..1562323c8e 100644 --- a/plonky2/src/gadgets/split_base.rs +++ b/plonky2/src/gadgets/split_base.rs @@ -1,3 +1,4 @@ +use alloc::string::{String, ToString}; use alloc::vec; use alloc::vec::Vec; use core::borrow::Borrow; diff --git a/plonky2/src/gadgets/split_join.rs b/plonky2/src/gadgets/split_join.rs index fb83c3a6cc..6901c8caf2 100644 --- a/plonky2/src/gadgets/split_join.rs +++ b/plonky2/src/gadgets/split_join.rs @@ -1,3 +1,4 @@ +use alloc::string::{String, ToString}; use alloc::vec; use alloc::vec::Vec; diff --git a/plonky2/src/gates/arithmetic_base.rs b/plonky2/src/gates/arithmetic_base.rs index 631b1c3715..dca1c5061a 100644 --- a/plonky2/src/gates/arithmetic_base.rs +++ b/plonky2/src/gates/arithmetic_base.rs @@ -1,5 +1,5 @@ use alloc::format; -use alloc::string::String; +use alloc::string::{String, ToString}; use alloc::vec::Vec; use crate::field::extension::Extendable; diff --git a/plonky2/src/gates/arithmetic_extension.rs b/plonky2/src/gates/arithmetic_extension.rs index 294c090274..b43d8d3ad4 100644 --- a/plonky2/src/gates/arithmetic_extension.rs +++ b/plonky2/src/gates/arithmetic_extension.rs @@ -1,5 +1,5 @@ use alloc::format; -use alloc::string::String; +use alloc::string::{String, ToString}; use alloc::vec::Vec; use core::ops::Range; diff --git a/plonky2/src/gates/base_sum.rs b/plonky2/src/gates/base_sum.rs index 181252a2d3..28131c1b19 100644 --- a/plonky2/src/gates/base_sum.rs +++ b/plonky2/src/gates/base_sum.rs @@ -1,4 +1,4 @@ -use alloc::string::String; +use alloc::string::{String, ToString}; use alloc::vec::Vec; use alloc::{format, vec}; use core::ops::Range; diff --git a/plonky2/src/gates/coset_interpolation.rs b/plonky2/src/gates/coset_interpolation.rs index c701b8cf7d..99046ec4a8 100644 --- a/plonky2/src/gates/coset_interpolation.rs +++ b/plonky2/src/gates/coset_interpolation.rs @@ -1,4 +1,4 @@ -use alloc::string::String; +use alloc::string::{String, ToString}; use alloc::vec::Vec; use alloc::{format, vec}; use core::marker::PhantomData; @@ -631,8 +631,6 @@ fn partial_interpolate_ext_algebra_target, const D: #[cfg(test)] mod tests { - use core::iter::repeat_with; - use anyhow::Result; use plonky2_field::polynomial::PolynomialValues; use plonky2_util::log2_strict; @@ -832,7 +830,7 @@ mod tests { // Get a working row for InterpolationGate. let shift = F::rand(); - let values = PolynomialValues::new(repeat_with(FF::rand).take(4).collect()); + let values = PolynomialValues::new(core::iter::repeat_with(FF::rand).take(4).collect()); let eval_point = FF::rand(); let gate = CosetInterpolationGate::::with_max_degree(2, 3); let vars = EvaluationVars { diff --git a/plonky2/src/gates/exponentiation.rs b/plonky2/src/gates/exponentiation.rs index 521520e86a..8e708b9711 100644 --- a/plonky2/src/gates/exponentiation.rs +++ b/plonky2/src/gates/exponentiation.rs @@ -1,4 +1,4 @@ -use alloc::string::String; +use alloc::string::{String, ToString}; use alloc::vec::Vec; use alloc::{format, vec}; use core::marker::PhantomData; diff --git a/plonky2/src/gates/lookup.rs b/plonky2/src/gates/lookup.rs index f682be23f2..3c03f6baa9 100644 --- a/plonky2/src/gates/lookup.rs +++ b/plonky2/src/gates/lookup.rs @@ -1,6 +1,6 @@ -use alloc::format; -use alloc::string::String; +use alloc::string::{String, ToString}; use alloc::vec::Vec; +use alloc::{format, vec}; use core::usize; use itertools::Itertools; diff --git a/plonky2/src/gates/lookup_table.rs b/plonky2/src/gates/lookup_table.rs index 9f9d967ea0..a683a87da9 100644 --- a/plonky2/src/gates/lookup_table.rs +++ b/plonky2/src/gates/lookup_table.rs @@ -1,7 +1,7 @@ -use alloc::format; -use alloc::string::String; +use alloc::string::{String, ToString}; use alloc::sync::Arc; use alloc::vec::Vec; +use alloc::{format, vec}; use core::usize; use itertools::Itertools; diff --git a/plonky2/src/gates/multiplication_extension.rs b/plonky2/src/gates/multiplication_extension.rs index 8f6b27db60..ba578d8be6 100644 --- a/plonky2/src/gates/multiplication_extension.rs +++ b/plonky2/src/gates/multiplication_extension.rs @@ -1,5 +1,5 @@ use alloc::format; -use alloc::string::String; +use alloc::string::{String, ToString}; use alloc::vec::Vec; use core::ops::Range; diff --git a/plonky2/src/gates/poseidon.rs b/plonky2/src/gates/poseidon.rs index f6d0657260..0842930d5f 100644 --- a/plonky2/src/gates/poseidon.rs +++ b/plonky2/src/gates/poseidon.rs @@ -1,4 +1,4 @@ -use alloc::string::String; +use alloc::string::{String, ToString}; use alloc::vec::Vec; use alloc::{format, vec}; use core::marker::PhantomData; diff --git a/plonky2/src/gates/poseidon_mds.rs b/plonky2/src/gates/poseidon_mds.rs index 8e2f4a7664..75f9ae5c94 100644 --- a/plonky2/src/gates/poseidon_mds.rs +++ b/plonky2/src/gates/poseidon_mds.rs @@ -1,4 +1,4 @@ -use alloc::string::String; +use alloc::string::{String, ToString}; use alloc::vec::Vec; use alloc::{format, vec}; use core::marker::PhantomData; diff --git a/plonky2/src/gates/random_access.rs b/plonky2/src/gates/random_access.rs index 9110a59b67..df1bb576e4 100644 --- a/plonky2/src/gates/random_access.rs +++ b/plonky2/src/gates/random_access.rs @@ -1,4 +1,4 @@ -use alloc::string::String; +use alloc::string::{String, ToString}; use alloc::vec::Vec; use alloc::{format, vec}; use core::marker::PhantomData; diff --git a/plonky2/src/gates/reducing.rs b/plonky2/src/gates/reducing.rs index b313efe695..46ff69c8d5 100644 --- a/plonky2/src/gates/reducing.rs +++ b/plonky2/src/gates/reducing.rs @@ -1,4 +1,4 @@ -use alloc::string::String; +use alloc::string::{String, ToString}; use alloc::vec::Vec; use alloc::{format, vec}; use core::ops::Range; diff --git a/plonky2/src/gates/reducing_extension.rs b/plonky2/src/gates/reducing_extension.rs index 5492c50611..77c1f39acc 100644 --- a/plonky2/src/gates/reducing_extension.rs +++ b/plonky2/src/gates/reducing_extension.rs @@ -1,4 +1,4 @@ -use alloc::string::String; +use alloc::string::{String, ToString}; use alloc::vec::Vec; use alloc::{format, vec}; use core::ops::Range; diff --git a/plonky2/src/hash/hashing.rs b/plonky2/src/hash/hashing.rs index 28d3b89f28..f5fe1f1ef6 100644 --- a/plonky2/src/hash/hashing.rs +++ b/plonky2/src/hash/hashing.rs @@ -2,7 +2,6 @@ use alloc::vec::Vec; use core::fmt::Debug; -use std::iter::repeat; use crate::field::extension::Extendable; use crate::field::types::Field; @@ -34,7 +33,7 @@ impl, const D: usize> CircuitBuilder { num_outputs: usize, ) -> Vec { let zero = self.zero(); - let mut state = H::AlgebraicPermutation::new(std::iter::repeat(zero)); + let mut state = H::AlgebraicPermutation::new(core::iter::repeat(zero)); // Absorb all input chunks. for input_chunk in inputs.chunks(H::AlgebraicPermutation::RATE) { @@ -71,7 +70,7 @@ pub trait PlonkyPermutation: /// received; remaining state (if any) initialised with /// `T::default()`. To initialise remaining elements with a /// different value, instead of your original `iter` pass - /// `iter.chain(std::iter::repeat(F::from_canonical_u64(12345)))` + /// `iter.chain(core::iter::repeat(F::from_canonical_u64(12345)))` /// or similar. fn new>(iter: I) -> Self; @@ -103,7 +102,7 @@ pub fn compress>(x: HashOut, y: HashOut) debug_assert_eq!(y.elements.len(), NUM_HASH_OUT_ELTS); debug_assert!(P::RATE >= NUM_HASH_OUT_ELTS); - let mut perm = P::new(repeat(F::ZERO)); + let mut perm = P::new(core::iter::repeat(F::ZERO)); perm.set_from_slice(&x.elements, 0); perm.set_from_slice(&y.elements, NUM_HASH_OUT_ELTS); @@ -120,7 +119,7 @@ pub fn hash_n_to_m_no_pad>( inputs: &[F], num_outputs: usize, ) -> Vec { - let mut perm = P::new(repeat(F::ZERO)); + let mut perm = P::new(core::iter::repeat(F::ZERO)); // Absorb all input chunks. for input_chunk in inputs.chunks(P::RATE) { diff --git a/plonky2/src/hash/keccak.rs b/plonky2/src/hash/keccak.rs index 43b02db42c..281220f309 100644 --- a/plonky2/src/hash/keccak.rs +++ b/plonky2/src/hash/keccak.rs @@ -1,6 +1,5 @@ use alloc::vec; use alloc::vec::Vec; -use core::iter; use core::mem::size_of; use itertools::Itertools; @@ -68,7 +67,7 @@ impl PlonkyPermutation for KeccakPermutation { .copy_from_slice(&self.state[i].to_canonical_u64().to_le_bytes()); } - let hash_onion = iter::repeat_with(|| { + let hash_onion = core::iter::repeat_with(|| { let output = keccak(state_bytes.clone()).to_fixed_bytes(); state_bytes = output.to_vec(); output diff --git a/plonky2/src/hash/merkle_proofs.rs b/plonky2/src/hash/merkle_proofs.rs index 14eb3a1cb3..c848f66ed0 100644 --- a/plonky2/src/hash/merkle_proofs.rs +++ b/plonky2/src/hash/merkle_proofs.rs @@ -132,7 +132,7 @@ impl, const D: usize> CircuitBuilder { perm_inputs.set_from_slice(&state.elements, 0); perm_inputs.set_from_slice(&sibling.elements, NUM_HASH_OUT_ELTS); // Ensure the rest of the state, if any, is zero: - perm_inputs.set_from_iter(std::iter::repeat(zero), 2 * NUM_HASH_OUT_ELTS); + perm_inputs.set_from_iter(core::iter::repeat(zero), 2 * NUM_HASH_OUT_ELTS); let perm_outs = self.permute_swapped::(perm_inputs, bit); let hash_outs = perm_outs.squeeze()[0..NUM_HASH_OUT_ELTS] .try_into() diff --git a/plonky2/src/hash/poseidon.rs b/plonky2/src/hash/poseidon.rs index a89deda705..8858bc7b77 100644 --- a/plonky2/src/hash/poseidon.rs +++ b/plonky2/src/hash/poseidon.rs @@ -3,7 +3,7 @@ use alloc::vec; use alloc::vec::Vec; -use std::fmt::Debug; +use core::fmt::Debug; use unroll::unroll_for_loops; diff --git a/plonky2/src/iop/challenger.rs b/plonky2/src/iop/challenger.rs index 9df49996c5..d5de2831a3 100644 --- a/plonky2/src/iop/challenger.rs +++ b/plonky2/src/iop/challenger.rs @@ -30,7 +30,7 @@ pub struct Challenger> { impl> Challenger { pub fn new() -> Challenger { Challenger { - sponge_state: H::Permutation::new(std::iter::repeat(F::ZERO)), + sponge_state: H::Permutation::new(core::iter::repeat(F::ZERO)), input_buffer: Vec::with_capacity(H::Permutation::RATE), output_buffer: Vec::with_capacity(H::Permutation::RATE), } @@ -175,7 +175,7 @@ impl, H: AlgebraicHasher, const D: usize> pub fn new(builder: &mut CircuitBuilder) -> Self { let zero = builder.zero(); Self { - sponge_state: H::AlgebraicPermutation::new(std::iter::repeat(zero)), + sponge_state: H::AlgebraicPermutation::new(core::iter::repeat(zero)), input_buffer: Vec::new(), output_buffer: Vec::new(), __: PhantomData, diff --git a/plonky2/src/iop/generator.rs b/plonky2/src/iop/generator.rs index 22d0fe0792..1704b34795 100644 --- a/plonky2/src/iop/generator.rs +++ b/plonky2/src/iop/generator.rs @@ -1,3 +1,5 @@ +use alloc::boxed::Box; +use alloc::string::{String, ToString}; use alloc::vec; use alloc::vec::Vec; use core::fmt::Debug; diff --git a/plonky2/src/lib.rs b/plonky2/src/lib.rs index c2913023f5..b02fc21bfb 100644 --- a/plonky2/src/lib.rs +++ b/plonky2/src/lib.rs @@ -2,7 +2,7 @@ #![allow(clippy::needless_range_loop)] #![cfg_attr(not(feature = "std"), no_std)] -extern crate alloc; +pub extern crate alloc; #[doc(inline)] pub use plonky2_field as field; diff --git a/plonky2/src/recursion/cyclic_recursion.rs b/plonky2/src/recursion/cyclic_recursion.rs index 4d5fc60250..60d5342a90 100644 --- a/plonky2/src/recursion/cyclic_recursion.rs +++ b/plonky2/src/recursion/cyclic_recursion.rs @@ -1,5 +1,7 @@ #![allow(clippy::int_plus_one)] // Makes more sense for some inequalities below. +use alloc::vec::Vec; + use anyhow::{ensure, Result}; use crate::field::extension::Extendable; diff --git a/plonky2/src/recursion/dummy_circuit.rs b/plonky2/src/recursion/dummy_circuit.rs index 620c979f4b..ee73105acc 100644 --- a/plonky2/src/recursion/dummy_circuit.rs +++ b/plonky2/src/recursion/dummy_circuit.rs @@ -1,3 +1,4 @@ +use alloc::string::{String, ToString}; use alloc::vec; use alloc::vec::Vec; diff --git a/plonky2/src/util/serialization/gate_serialization.rs b/plonky2/src/util/serialization/gate_serialization.rs index 008e29c0bf..dfc29f19bd 100644 --- a/plonky2/src/util/serialization/gate_serialization.rs +++ b/plonky2/src/util/serialization/gate_serialization.rs @@ -1,3 +1,7 @@ +//! A module to help with GateRef serialization + +use alloc::vec::Vec; + use plonky2_field::extension::Extendable; use crate::gates::gate::GateRef; @@ -44,7 +48,11 @@ macro_rules! get_gate_tag_impl { Ok(tag) } else)* { - log::log!(log::Level::Error, "attempted to serialize gate with id `{}` which is unsupported by this gate serializer", $gate.0.id()); + log::log!( + log::Level::Error, + "attempted to serialize gate with id `{}` which is unsupported by this gate serializer", + $gate.0.id() + ); Err($crate::util::serialization::IoError) } }}; diff --git a/plonky2/src/util/serialization/generator_serialization.rs b/plonky2/src/util/serialization/generator_serialization.rs index 6e00340090..e5713db59e 100644 --- a/plonky2/src/util/serialization/generator_serialization.rs +++ b/plonky2/src/util/serialization/generator_serialization.rs @@ -1,5 +1,7 @@ //! A module to help with WitnessGeneratorRef serialization +use alloc::vec::Vec; + use plonky2_field::extension::Extendable; use crate::hash::hash_types::RichField; @@ -50,7 +52,11 @@ macro_rules! get_generator_tag_impl { Ok(tag) } else)* { - log::log!(log::Level::Error, "attempted to serialize generator with id {} which is unsupported by this generator serializer", $generator.0.id()); + log::log!( + log::Level::Error, + "attempted to serialize generator with id {} which is unsupported by this generator serializer", + $generator.0.id() + ); Err($crate::util::serialization::IoError) } }}; diff --git a/plonky2/src/util/serialization/mod.rs b/plonky2/src/util/serialization/mod.rs index ca95b4a137..1861cba241 100644 --- a/plonky2/src/util/serialization/mod.rs +++ b/plonky2/src/util/serialization/mod.rs @@ -134,7 +134,7 @@ pub trait Read { /// Reads a `usize` value from `self`. #[inline] fn read_usize(&mut self) -> IoResult { - let mut buf = [0; std::mem::size_of::()]; + let mut buf = [0; core::mem::size_of::()]; self.read_exact(&mut buf)?; Ok(u64::from_le_bytes(buf) as usize) } From 5e81b2de5c71a3f60d602db49c5b636a4bc4cdbd Mon Sep 17 00:00:00 2001 From: muraca Date: Mon, 6 Nov 2023 23:43:34 +0100 Subject: [PATCH 3/8] make `starky` build on `wasm32-unknown-unknown` small oversight on `plonky2` fixed Signed-off-by: muraca --- plonky2/src/util/serialization/gate_serialization.rs | 2 +- plonky2/src/util/serialization/generator_serialization.rs | 2 +- starky/src/recursive_verifier.rs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plonky2/src/util/serialization/gate_serialization.rs b/plonky2/src/util/serialization/gate_serialization.rs index dfc29f19bd..d858a05764 100644 --- a/plonky2/src/util/serialization/gate_serialization.rs +++ b/plonky2/src/util/serialization/gate_serialization.rs @@ -76,7 +76,7 @@ macro_rules! impl_gate_serializer { fn write_gate( &self, - buf: &mut Vec, + buf: &mut $crate::alloc::vec::Vec, gate: &$crate::gates::gate::GateRef, common: &$crate::plonk::circuit_data::CommonCircuitData, ) -> $crate::util::serialization::IoResult<()> { diff --git a/plonky2/src/util/serialization/generator_serialization.rs b/plonky2/src/util/serialization/generator_serialization.rs index e5713db59e..19a22a77c3 100644 --- a/plonky2/src/util/serialization/generator_serialization.rs +++ b/plonky2/src/util/serialization/generator_serialization.rs @@ -80,7 +80,7 @@ macro_rules! impl_generator_serializer { fn write_generator( &self, - buf: &mut Vec, + buf: &mut $crate::alloc::vec::Vec, generator: &$crate::iop::generator::WitnessGeneratorRef, common: &$crate::plonk::circuit_data::CommonCircuitData, ) -> $crate::util::serialization::IoResult<()> { diff --git a/starky/src/recursive_verifier.rs b/starky/src/recursive_verifier.rs index bd5d2f1916..18db561be2 100644 --- a/starky/src/recursive_verifier.rs +++ b/starky/src/recursive_verifier.rs @@ -1,3 +1,4 @@ +use alloc::vec::Vec; use core::iter::once; use anyhow::{ensure, Result}; From 7b70c81f1470798280e5eb6408a7008ca55c3617 Mon Sep 17 00:00:00 2001 From: muraca Date: Tue, 7 Nov 2023 10:02:06 +0100 Subject: [PATCH 4/8] skip `evm` folder if target is `wasm32-unknown-unknown` Signed-off-by: muraca --- .github/workflows/continuous-integration-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 2b42dba03e..b8d0a66a3f 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -65,6 +65,7 @@ jobs: RUST_BACKTRACE: 1 - name: Check in evm subdirectory + if: ${{ matrix.target != wasm32-unknown-unknown }} uses: actions-rs/cargo@v1 with: command: check From 8cd544185c8e5cee55a7c500c3be56da394f1a6a Mon Sep 17 00:00:00 2001 From: muraca Date: Tue, 7 Nov 2023 10:02:47 +0100 Subject: [PATCH 5/8] add `default: true` to toolchain Signed-off-by: muraca --- .github/workflows/continuous-integration-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index b8d0a66a3f..44862c1d3b 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -29,6 +29,7 @@ jobs: profile: minimal toolchain: nightly target: ${{ matrix.target }} + default: true override: true - name: rust-cache From b25feacb6cd3abecc13e32f142f15cc2dacebc78 Mon Sep 17 00:00:00 2001 From: muraca Date: Tue, 7 Nov 2023 15:03:51 +0100 Subject: [PATCH 6/8] skip `test` if target is `wasm32-unknown-unknown` Signed-off-by: muraca --- .github/workflows/continuous-integration-workflow.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 44862c1d3b..40ea0370bb 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -66,7 +66,7 @@ jobs: RUST_BACKTRACE: 1 - name: Check in evm subdirectory - if: ${{ matrix.target != wasm32-unknown-unknown }} + if: ${{ matrix.target != "wasm32-unknown-unknown" }} uses: actions-rs/cargo@v1 with: command: check @@ -78,6 +78,7 @@ jobs: RUST_BACKTRACE: 1 - name: Run cargo test + if: ${{ matrix.target != "wasm32-unknown-unknown" }} uses: actions-rs/cargo@v1 with: command: test From a38ed46ef0183b66e91614b4744ad81c3cd9d09b Mon Sep 17 00:00:00 2001 From: muraca Date: Tue, 7 Nov 2023 15:07:14 +0100 Subject: [PATCH 7/8] single ticks instead of double Signed-off-by: muraca --- .github/workflows/continuous-integration-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 40ea0370bb..4f16757716 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -66,7 +66,7 @@ jobs: RUST_BACKTRACE: 1 - name: Check in evm subdirectory - if: ${{ matrix.target != "wasm32-unknown-unknown" }} + if: ${{ matrix.target != 'wasm32-unknown-unknown' }} uses: actions-rs/cargo@v1 with: command: check @@ -78,7 +78,7 @@ jobs: RUST_BACKTRACE: 1 - name: Run cargo test - if: ${{ matrix.target != "wasm32-unknown-unknown" }} + if: ${{ matrix.target != 'wasm32-unknown-unknown' }} uses: actions-rs/cargo@v1 with: command: test From 8fd3e76c57dcd42c66c3e202b72fafe461d826e2 Mon Sep 17 00:00:00 2001 From: muraca Date: Tue, 7 Nov 2023 15:14:44 +0100 Subject: [PATCH 8/8] explicit target Signed-off-by: muraca --- .github/workflows/continuous-integration-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 4f16757716..47183dd367 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -47,7 +47,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: check - args: --manifest-path plonky2/Cargo.toml + args: --manifest-path plonky2/Cargo.toml --target ${{ matrix.target }} env: RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 RUST_LOG: 1 @@ -58,7 +58,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: check - args: --manifest-path starky/Cargo.toml + args: --manifest-path starky/Cargo.toml --target ${{ matrix.target }} env: RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 RUST_LOG: 1