From 295d82e051bb071aa18faf5334e4fbc9d9849738 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Fri, 4 Aug 2023 15:55:51 +0100 Subject: [PATCH 01/18] chore: remove unnecessary cloning of package dependencies (#2175) --- crates/nargo_cli/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/nargo_cli/src/lib.rs b/crates/nargo_cli/src/lib.rs index 05753f7f3d8..9cebbdabe5f 100644 --- a/crates/nargo_cli/src/lib.rs +++ b/crates/nargo_cli/src/lib.rs @@ -102,14 +102,14 @@ fn list_files_and_folders_in>(path: P) -> Option { fn prepare_dependencies( context: &mut Context, parent_crate: CrateId, - dependencies: BTreeMap, + dependencies: &BTreeMap, ) { - for (dep_name, dep) in dependencies.into_iter() { + for (dep_name, dep) in dependencies.iter() { match dep { Dependency::Remote { package } | Dependency::Local { package } => { let crate_id = prepare_crate(context, &package.entry_path, package.crate_type); - add_dep(context, parent_crate, crate_id, dep_name); - prepare_dependencies(context, crate_id, package.dependencies.to_owned()); + add_dep(context, parent_crate, crate_id, dep_name.clone()); + prepare_dependencies(context, crate_id, &package.dependencies); } } } @@ -122,7 +122,7 @@ fn prepare_package(package: &Package) -> (Context, CrateId) { let crate_id = prepare_crate(&mut context, &package.entry_path, package.crate_type); - prepare_dependencies(&mut context, crate_id, package.dependencies.to_owned()); + prepare_dependencies(&mut context, crate_id, &package.dependencies); (context, crate_id) } From 928b3ad5d93943960cc6f480b28bce25f29b3271 Mon Sep 17 00:00:00 2001 From: Alexander Ivanov Date: Fri, 4 Aug 2023 18:11:01 +0300 Subject: [PATCH 02/18] fix: fix an ICE happening when we call a closure result from if/else (#2146) * fix: fix an ICE happening when we call a closure result from if/else * refactor: moved test to a regression fn, cleanup code --- .../higher_order_functions/src/main.nr | 20 +++++++++++++++++++ .../src/monomorphization/mod.rs | 15 ++++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/crates/nargo_cli/tests/test_data/higher_order_functions/src/main.nr b/crates/nargo_cli/tests/test_data/higher_order_functions/src/main.nr index fefd23b7dbc..782b6af998e 100644 --- a/crates/nargo_cli/tests/test_data/higher_order_functions/src/main.nr +++ b/crates/nargo_cli/tests/test_data/higher_order_functions/src/main.nr @@ -36,6 +36,8 @@ fn main() -> pub Field { x += 1; assert(closure_capturing_mutable(1) == 5); + regression_2154(); + let ret = twice(add1, 3); test_array_functions(); @@ -85,3 +87,21 @@ fn add1(x: Field) -> Field { fn twice(f: fn(Field) -> Field, x: Field) -> Field { f(f(x)) } + +// Fixing an ICE, where rewriting the closures +// during monomorphization didn't correspond +// to an internal `if` type +// found by @jfecher: +// https://github.com/noir-lang/noir/pull/1959#issuecomment-1658992989 +// issue https://github.com/noir-lang/noir/issues/2154 +fn regression_2154() { + let x: u32 = 32; + + let closure_if_else = if x > 2 { + || x + } else { + || x + 2342 + }; + + assert(closure_if_else() == 32); +} diff --git a/crates/noirc_frontend/src/monomorphization/mod.rs b/crates/noirc_frontend/src/monomorphization/mod.rs index c8167baf6bb..6c9724de6ce 100644 --- a/crates/noirc_frontend/src/monomorphization/mod.rs +++ b/crates/noirc_frontend/src/monomorphization/mod.rs @@ -689,8 +689,19 @@ impl<'interner> Monomorphizer<'interner> { HirType::Function(args, ret, env) => { let args = vecmap(args, Self::convert_type); let ret = Box::new(Self::convert_type(ret)); - let env = Box::new(Self::convert_type(env)); - ast::Type::Function(args, ret, env) + let env = Self::convert_type(env); + match &env { + ast::Type::Unit => ast::Type::Function(args, ret, Box::new(env)), + ast::Type::Tuple(_elements) => ast::Type::Tuple(vec![ + env.clone(), + ast::Type::Function(args, ret, Box::new(env)), + ]), + _ => { + unreachable!( + "internal Type::Function env should be either a Unit or a Tuple, not {env}" + ) + } + } } HirType::MutableReference(element) => { From bbf7ae2e5a30e72477ba170030ad057a66b60335 Mon Sep 17 00:00:00 2001 From: guipublic <47281315+guipublic@users.noreply.github.com> Date: Fri, 4 Aug 2023 17:12:25 +0200 Subject: [PATCH 03/18] chore: Do not create new memory block when not needed (#2142) * Do not create new MemoryBlock when not needed * code review - handle function call * code review * code review * add missing commit * code review * fix failing test case --- crates/noirc_evaluator/src/ssa.rs | 3 +- .../noirc_evaluator/src/ssa/acir_gen/mod.rs | 79 +++++++++++++------ .../noirc_evaluator/src/ssa/ir/post_order.rs | 4 + .../noirc_evaluator/src/ssa/opt/array_use.rs | 57 +++++++++++++ crates/noirc_evaluator/src/ssa/opt/mod.rs | 1 + 5 files changed, 119 insertions(+), 25 deletions(-) create mode 100644 crates/noirc_evaluator/src/ssa/opt/array_use.rs diff --git a/crates/noirc_evaluator/src/ssa.rs b/crates/noirc_evaluator/src/ssa.rs index 2b7be935619..81982e463a0 100644 --- a/crates/noirc_evaluator/src/ssa.rs +++ b/crates/noirc_evaluator/src/ssa.rs @@ -62,7 +62,8 @@ pub(crate) fn optimize_into_acir( .dead_instruction_elimination() .print(print_ssa_passes, "After Dead Instruction Elimination:"); } - ssa.into_acir(brillig, abi_distinctness) + let last_array_uses = ssa.find_last_array_uses(); + ssa.into_acir(brillig, abi_distinctness, &last_array_uses) } /// Compiles the [`Program`] into [`ACIR`][acvm::acir::circuit::Circuit]. diff --git a/crates/noirc_evaluator/src/ssa/acir_gen/mod.rs b/crates/noirc_evaluator/src/ssa/acir_gen/mod.rs index f473becd966..aca809a85fa 100644 --- a/crates/noirc_evaluator/src/ssa/acir_gen/mod.rs +++ b/crates/noirc_evaluator/src/ssa/acir_gen/mod.rs @@ -112,9 +112,10 @@ impl Ssa { self, brillig: Brillig, abi_distinctness: AbiDistinctness, + last_array_uses: &HashMap, ) -> Result { let context = Context::new(); - let mut generated_acir = context.convert_ssa(self, brillig)?; + let mut generated_acir = context.convert_ssa(self, brillig, last_array_uses)?; match abi_distinctness { AbiDistinctness::Distinct => { @@ -154,10 +155,15 @@ impl Context { } /// Converts SSA into ACIR - fn convert_ssa(self, ssa: Ssa, brillig: Brillig) -> Result { + fn convert_ssa( + self, + ssa: Ssa, + brillig: Brillig, + last_array_uses: &HashMap, + ) -> Result { let main_func = ssa.main(); match main_func.runtime() { - RuntimeType::Acir => self.convert_acir_main(main_func, &ssa, brillig), + RuntimeType::Acir => self.convert_acir_main(main_func, &ssa, brillig, last_array_uses), RuntimeType::Brillig => self.convert_brillig_main(main_func, brillig), } } @@ -167,13 +173,14 @@ impl Context { main_func: &Function, ssa: &Ssa, brillig: Brillig, + last_array_uses: &HashMap, ) -> Result { let dfg = &main_func.dfg; let entry_block = &dfg[main_func.entry_block()]; let input_witness = self.convert_ssa_block_params(entry_block.parameters(), dfg)?; for instruction_id in entry_block.instructions() { - self.convert_ssa_instruction(*instruction_id, dfg, ssa, &brillig)?; + self.convert_ssa_instruction(*instruction_id, dfg, ssa, &brillig, last_array_uses)?; } self.convert_ssa_return(entry_block.unwrap_terminator(), dfg)?; @@ -310,6 +317,7 @@ impl Context { dfg: &DataFlowGraph, ssa: &Ssa, brillig: &Brillig, + last_array_uses: &HashMap, ) -> Result<(), RuntimeError> { let instruction = &dfg[instruction_id]; self.acir_context.set_location(dfg.get_location(&instruction_id)); @@ -389,10 +397,24 @@ impl Context { self.current_side_effects_enabled_var = acir_var; } Instruction::ArrayGet { array, index } => { - self.handle_array_operation(instruction_id, *array, *index, None, dfg)?; + self.handle_array_operation( + instruction_id, + *array, + *index, + None, + dfg, + last_array_uses, + )?; } Instruction::ArraySet { array, index, value } => { - self.handle_array_operation(instruction_id, *array, *index, Some(*value), dfg)?; + self.handle_array_operation( + instruction_id, + *array, + *index, + Some(*value), + dfg, + last_array_uses, + )?; } Instruction::Allocate => { unreachable!("Expected all allocate instructions to be removed before acir_gen") @@ -447,6 +469,7 @@ impl Context { index: ValueId, store_value: Option, dfg: &DataFlowGraph, + last_array_uses: &HashMap, ) -> Result<(), RuntimeError> { let index_const = dfg.get_numeric_constant(index); @@ -504,9 +527,10 @@ impl Context { } AcirValue::DynamicArray(_) => (), } - + let resolved_array = dfg.resolve(array); + let map_array = last_array_uses.get(&resolved_array) == Some(&instruction); if let Some(store) = store_value { - self.array_set(instruction, array, index, store, dfg)?; + self.array_set(instruction, array, index, store, dfg, map_array)?; } else { self.array_get(instruction, array, index, dfg)?; } @@ -568,6 +592,7 @@ impl Context { index: ValueId, store_value: ValueId, dfg: &DataFlowGraph, + map_array: bool, ) -> Result<(), InternalError> { // Fetch the internal SSA ID for the array let array = dfg.resolve(array); @@ -602,24 +627,30 @@ impl Context { } // Since array_set creates a new array, we create a new block ID for this - // array. + // array, unless map_array is true. In that case, we operate directly on block_id + // and we do not create a new block ID. let result_id = dfg .instruction_results(instruction) .first() .expect("Array set does not have one result"); - let result_block_id = self.block_id(result_id); - - // Initialize the new array with the values from the old array - let init_values = try_vecmap(0..len, |i| { - let index = AcirValue::Var( - self.acir_context.add_constant(FieldElement::from(i as u128)), - AcirType::NumericType(NumericType::NativeField), - ); - let var = index.into_var()?; - let read = self.acir_context.read_from_memory(block_id, &var)?; - Ok(AcirValue::Var(read, AcirType::NumericType(NumericType::NativeField))) - })?; - self.initialize_array(result_block_id, len, Some(&init_values))?; + let result_block_id; + if map_array { + self.memory_blocks.insert(*result_id, block_id); + result_block_id = block_id; + } else { + // Initialize the new array with the values from the old array + result_block_id = self.block_id(result_id); + let init_values = try_vecmap(0..len, |i| { + let index = AcirValue::Var( + self.acir_context.add_constant(FieldElement::from(i as u128)), + AcirType::NumericType(NumericType::NativeField), + ); + let var = index.into_var()?; + let read = self.acir_context.read_from_memory(block_id, &var)?; + Ok(AcirValue::Var(read, AcirType::NumericType(NumericType::NativeField))) + })?; + self.initialize_array(result_block_id, len, Some(&init_values))?; + } // Write the new value into the new array at the specified index let index_var = self.convert_value(index, dfg).into_var()?; @@ -1090,7 +1121,7 @@ impl Context { #[cfg(test)] mod tests { - use std::rc::Rc; + use std::{rc::Rc, collections::HashMap}; use acvm::{ acir::{ @@ -1130,7 +1161,7 @@ mod tests { let ssa = builder.finish(); let context = Context::new(); - let acir = context.convert_ssa(ssa, Brillig::default()).unwrap(); + let acir = context.convert_ssa(ssa, Brillig::default(), &HashMap::new()).unwrap(); let expected_opcodes = vec![Opcode::Arithmetic(&Expression::one() - &Expression::from(Witness(1)))]; diff --git a/crates/noirc_evaluator/src/ssa/ir/post_order.rs b/crates/noirc_evaluator/src/ssa/ir/post_order.rs index 202f5cff716..e3bdbd491df 100644 --- a/crates/noirc_evaluator/src/ssa/ir/post_order.rs +++ b/crates/noirc_evaluator/src/ssa/ir/post_order.rs @@ -27,6 +27,10 @@ impl PostOrder { PostOrder(Self::compute_post_order(func)) } + pub(crate) fn into_vec(self) -> Vec { + self.0 + } + // Computes the post-order of the function by doing a depth-first traversal of the // function's entry block's previously unvisited children. Each block is sequenced according // to when the traversal exits it. diff --git a/crates/noirc_evaluator/src/ssa/opt/array_use.rs b/crates/noirc_evaluator/src/ssa/opt/array_use.rs new file mode 100644 index 00000000000..5b45d768e1f --- /dev/null +++ b/crates/noirc_evaluator/src/ssa/opt/array_use.rs @@ -0,0 +1,57 @@ +use std::collections::HashMap; + +use crate::ssa::{ + ir::{ + basic_block::BasicBlockId, + dfg::DataFlowGraph, + instruction::{Instruction, InstructionId}, + post_order::PostOrder, + value::{Value, ValueId}, + }, + ssa_gen::Ssa, +}; + +impl Ssa { + /// Map arrays with the last instruction that uses it + /// For this we simply process all the instructions in execution order + /// and update the map whenever there is a match + pub(crate) fn find_last_array_uses(&self) -> HashMap { + let mut array_use = HashMap::new(); + for func in self.functions.values() { + let mut reverse_post_order = PostOrder::with_function(func).into_vec(); + reverse_post_order.reverse(); + for block in reverse_post_order { + last_use(block, &func.dfg, &mut array_use); + } + } + array_use + } +} + +/// Updates the array_def map when an instructions is using an array +fn last_use( + block_id: BasicBlockId, + dfg: &DataFlowGraph, + array_def: &mut HashMap, +) { + let block = &dfg[block_id]; + for instruction_id in block.instructions() { + match &dfg[*instruction_id] { + Instruction::ArrayGet { array, .. } | Instruction::ArraySet { array, .. } => { + let array = dfg.resolve(*array); + array_def.insert(array, *instruction_id); + } + Instruction::Call { arguments, .. } => { + for argument in arguments { + let resolved_arg = dfg.resolve(*argument); + if matches!(dfg[resolved_arg], Value::Array { .. }) { + array_def.insert(resolved_arg, *instruction_id); + } + } + } + _ => { + // Nothing to do + } + } + } +} diff --git a/crates/noirc_evaluator/src/ssa/opt/mod.rs b/crates/noirc_evaluator/src/ssa/opt/mod.rs index 0d4ad594486..23b4c726a6b 100644 --- a/crates/noirc_evaluator/src/ssa/opt/mod.rs +++ b/crates/noirc_evaluator/src/ssa/opt/mod.rs @@ -3,6 +3,7 @@ //! Each pass is generally expected to mutate the SSA IR into a gradually //! simpler form until the IR only has a single function remaining with 1 block within it. //! Generally, these passes are also expected to minimize the final amount of instructions. +mod array_use; mod constant_folding; mod defunctionalize; mod die; From 099f4d421e86c471343693d29e77beb1fb912a33 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Fri, 4 Aug 2023 09:59:35 -0700 Subject: [PATCH 04/18] fix(nargo): Make dependencies section optional in TOML (#2161) --- crates/nargo_cli/src/manifest.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/crates/nargo_cli/src/manifest.rs b/crates/nargo_cli/src/manifest.rs index e1da57c0c2b..0a17f62a7a4 100644 --- a/crates/nargo_cli/src/manifest.rs +++ b/crates/nargo_cli/src/manifest.rs @@ -15,6 +15,7 @@ use crate::{errors::ManifestError, git::clone_git_repo}; #[derive(Debug, Deserialize, Clone)] struct PackageConfig { package: PackageMetadata, + #[serde(default)] dependencies: BTreeMap, } @@ -260,6 +261,19 @@ fn parse_standard_toml() { assert!(Config::try_from(src).is_ok()); } +#[test] +fn parse_package_toml_no_deps() { + let src = r#" + [package] + name = "test" + authors = ["kev", "foo"] + compiler_version = "0.1" + "#; + + assert!(Config::try_from(String::from(src)).is_ok()); + assert!(Config::try_from(src).is_ok()); +} + #[test] fn parse_workspace_toml() { let src = r#" From 1c991d0f0eac9270eb218b9ad672e36e8af74bc9 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Fri, 4 Aug 2023 10:04:11 -0700 Subject: [PATCH 05/18] feat(nargo)!: Require package `type` be specified in Nargo.toml (#2134) * feat!: Require package type be specified in Nargo.toml * chore: add package type to new test cases * Update crates/nargo_cli/src/cli/init_cmd.rs * Add conflicts_with to flags Co-authored-by: Koby Hall <102518238+kobyhallx@users.noreply.github.com> * Comment cleanup Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> * defer clone * derive eq * Update crates/noirc_driver/src/lib.rs * fix rebase problems * Update crates/nargo_cli/src/errors.rs * chore: remove newlines in config.toml --------- Co-authored-by: Tom French Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> Co-authored-by: Koby Hall <102518238+kobyhallx@users.noreply.github.com> --- crates/lsp/src/lib.rs | 9 +-- crates/lsp/src/lib_hacky.rs | 6 +- crates/nargo/src/package.rs | 43 +++++++++++++- crates/nargo_cli/src/cli/check_cmd.rs | 52 +++++++++-------- .../nargo_cli/src/cli/codegen_verifier_cmd.rs | 26 +++++---- crates/nargo_cli/src/cli/compile_cmd.rs | 29 +++++----- crates/nargo_cli/src/cli/execute_cmd.rs | 7 +-- crates/nargo_cli/src/cli/info_cmd.rs | 7 +-- crates/nargo_cli/src/cli/init_cmd.rs | 43 ++++++++++++-- crates/nargo_cli/src/cli/mod.rs | 7 +-- crates/nargo_cli/src/cli/new_cmd.rs | 13 ++++- crates/nargo_cli/src/cli/prove_cmd.rs | 7 +-- crates/nargo_cli/src/cli/verify_cmd.rs | 25 ++++---- crates/nargo_cli/src/errors.rs | 57 ++++++++++++------- crates/nargo_cli/src/lib.rs | 29 +--------- crates/nargo_cli/src/manifest.rs | 57 +++++++++++++++---- .../target_tests_data/fail/basic/Nargo.toml | 1 + .../fail/dup_func/Nargo.toml | 1 + .../target_tests_data/pass/basic/Nargo.toml | 1 + .../target_tests_data/pass/import/Nargo.toml | 1 + .../pass_dev_mode/unused/Nargo.toml | 1 + .../1327_concrete_in_generic/Nargo.toml | 1 + .../tests/test_data/1_mul/Nargo.toml | 1 + .../tests/test_data/2_div/Nargo.toml | 1 + .../tests/test_data/3_add/Nargo.toml | 1 + .../tests/test_data/4_sub/Nargo.toml | 1 + .../tests/test_data/5_over/Nargo.toml | 1 + crates/nargo_cli/tests/test_data/6/Nargo.toml | 1 + .../tests/test_data/6_array/Nargo.toml | 1 + crates/nargo_cli/tests/test_data/7/Nargo.toml | 1 + .../tests/test_data/7_function/Nargo.toml | 1 + .../tests/test_data/8_integration/Nargo.toml | 1 + .../tests/test_data/9_conditional/Nargo.toml | 1 + .../arithmetic_binary_operations/Nargo.toml | 1 + .../tests/test_data/array_dynamic/Nargo.toml | 1 + .../tests/test_data/array_len/Nargo.toml | 1 + .../tests/test_data/array_neq/Nargo.toml | 1 + .../tests/test_data/array_sort/Nargo.toml | 1 + .../tests/test_data/assert/Nargo.toml | 1 + .../test_data/assert_statement/Nargo.toml | 1 + .../tests/test_data/assign_ex/Nargo.toml | 1 + .../tests/test_data/bit_and/Nargo.toml | 1 + .../test_data/bit_shifts_comptime/Nargo.toml | 1 + .../test_data/bit_shifts_runtime/Nargo.toml | 1 + .../blackbox_func_simple_call/Nargo.toml | 1 + .../tests/test_data/bool_not/Nargo.toml | 1 + .../tests/test_data/bool_or/Nargo.toml | 1 + .../brillig_acir_as_brillig/Nargo.toml | 1 + .../tests/test_data/brillig_arrays/Nargo.toml | 1 + .../tests/test_data/brillig_assert/Nargo.toml | 1 + .../test_data/brillig_assert_fail/Nargo.toml | 1 + .../test_data/brillig_blake2s/Nargo.toml | 1 + .../tests/test_data/brillig_calls/Nargo.toml | 1 + .../test_data/brillig_calls_array/Nargo.toml | 1 + .../brillig_calls_conditionals/Nargo.toml | 1 + .../tests/test_data/brillig_cast/Nargo.toml | 1 + .../test_data/brillig_conditional/Nargo.toml | 1 + .../tests/test_data/brillig_ecdsa/Nargo.toml | 1 + .../Nargo.toml | 1 + .../brillig_fns_as_values/Nargo.toml | 1 + .../brillig_hash_to_field/Nargo.toml | 1 + .../brillig_identity_function/Nargo.toml | 1 + .../Nargo.toml | 1 + .../tests/test_data/brillig_keccak/Nargo.toml | 1 + .../tests/test_data/brillig_loop/Nargo.toml | 1 + .../tests/test_data/brillig_modulo/Nargo.toml | 1 + .../brillig_nested_arrays/Nargo.toml | 1 + .../tests/test_data/brillig_not/Nargo.toml | 1 + .../tests/test_data/brillig_oracle/Nargo.toml | 1 + .../test_data/brillig_pedersen/Nargo.toml | 1 + .../test_data/brillig_recursion/Nargo.toml | 1 + .../test_data/brillig_references/Nargo.toml | 1 + .../test_data/brillig_scalar_mul/Nargo.toml | 1 + .../test_data/brillig_schnorr/Nargo.toml | 1 + .../tests/test_data/brillig_sha256/Nargo.toml | 1 + .../tests/test_data/brillig_slices/Nargo.toml | 1 + .../test_data/brillig_to_be_bytes/Nargo.toml | 1 + .../test_data/brillig_to_bits/Nargo.toml | 1 + .../brillig_to_bytes_integration/Nargo.toml | 1 + .../test_data/brillig_to_le_bytes/Nargo.toml | 1 + .../test_data/brillig_top_level/Nargo.toml | 1 + .../tests/test_data/cast_bool/Nargo.toml | 1 + .../test_data/closures_mut_ref/Nargo.toml | 3 +- .../comptime_array_access/Nargo.toml | 1 + .../comptime_recursion_regression/Nargo.toml | 1 + crates/nargo_cli/tests/test_data/config.toml | 2 +- .../test_data/constant_return/Nargo.toml | 1 + .../tests/test_data/contracts/Nargo.toml | 1 + .../tests/test_data/debug_logs/Nargo.toml | 1 + .../test_data/dep_impl_primitive/Nargo.toml | 1 + .../tests/test_data/depend_on_bin/Nargo.toml | 8 +++ .../tests/test_data/depend_on_bin/Prover.toml | 1 + .../tests/test_data/depend_on_bin/src/main.nr | 5 ++ .../tests/test_data/diamond_deps_0/Nargo.toml | 1 + .../test_data/distinct_keyword/Nargo.toml | 1 + .../tests/test_data/ec_baby_jubjub/Nargo.toml | 1 + .../test_data/ecdsa_secp256k1/Nargo.toml | 1 + .../test_data/ecdsa_secp256r1/Nargo.toml | 1 + .../tests/test_data/generics/Nargo.toml | 1 + .../tests/test_data/global_consts/Nargo.toml | 1 + .../tests/test_data/hash_to_field/Nargo.toml | 1 + .../higher_order_fn_selector/Nargo.toml | 3 +- .../higher_order_functions/Nargo.toml | 3 +- .../tests/test_data/if_else_chain/Nargo.toml | 1 + .../tests/test_data/inner_outer_cl/Nargo.toml | 3 +- .../integer_array_indexing/Nargo.toml | 1 + .../tests/test_data/keccak256/Nargo.toml | 1 + .../tests/test_data/let_stmt/Nargo.toml | 1 + .../tests/test_data/main_bool_arg/Nargo.toml | 1 + .../tests/test_data/main_return/Nargo.toml | 1 + .../tests/test_data/merkle_insert/Nargo.toml | 1 + .../tests/test_data/modules/Nargo.toml | 1 + .../tests/test_data/modules_more/Nargo.toml | 1 + .../tests/test_data/modulus/Nargo.toml | 1 + .../nested_arrays_from_brillig/Nargo.toml | 1 + .../test_data/numeric_generics/Nargo.toml | 1 + .../tests/test_data/option/Nargo.toml | 1 + .../tests/test_data/pedersen_check/Nargo.toml | 1 + .../test_data/poseidon_bn254_hash/Nargo.toml | 1 + .../poseidonsponge_x5_254/Nargo.toml | 1 + .../tests/test_data/pred_eq/Nargo.toml | 1 + .../tests/test_data/references/Nargo.toml | 1 + .../tests/test_data/regression/Nargo.toml | 1 + .../test_data/regression_2099/Nargo.toml | 3 +- .../Nargo.toml | 1 + .../tests/test_data/ret_fn_ret_cl/Nargo.toml | 3 +- .../tests/test_data/scalar_mul/Nargo.toml | 1 + .../tests/test_data/schnorr/Nargo.toml | 1 + .../tests/test_data/sha256/Nargo.toml | 1 + .../tests/test_data/sha2_blocks/Nargo.toml | 1 + .../tests/test_data/sha2_byte/Nargo.toml | 1 + .../test_data/signed_division/Nargo.toml | 1 + .../simple_add_and_ret_arr/Nargo.toml | 1 + .../test_data/simple_array_param/Nargo.toml | 1 + .../tests/test_data/simple_bitwise/Nargo.toml | 1 + .../test_data/simple_comparison/Nargo.toml | 1 + .../tests/test_data/simple_mut/Nargo.toml | 1 + .../tests/test_data/simple_not/Nargo.toml | 1 + .../tests/test_data/simple_print/Nargo.toml | 1 + .../simple_program_addition/Nargo.toml | 1 + .../simple_program_no_body/Nargo.toml | 1 + .../tests/test_data/simple_radix/Nargo.toml | 1 + .../tests/test_data/simple_range/Nargo.toml | 1 + .../tests/test_data/simple_shield/Nargo.toml | 1 + .../simple_shift_left_right/Nargo.toml | 1 + .../tests/test_data/slices/Nargo.toml | 1 + .../tests/test_data/strings/Nargo.toml | 1 + .../tests/test_data/struct/Nargo.toml | 1 + .../test_data/struct_array_inputs/Nargo.toml | 1 + .../struct_fields_ordering/Nargo.toml | 1 + .../tests/test_data/struct_inputs/Nargo.toml | 1 + .../tests/test_data/submodules/Nargo.toml | 1 + .../tests/test_data/to_be_bytes/Nargo.toml | 1 + .../tests/test_data/to_bits/Nargo.toml | 1 + .../test_data/to_bytes_integration/Nargo.toml | 1 + .../tests/test_data/to_le_bytes/Nargo.toml | 1 + .../tests/test_data/tuples/Nargo.toml | 1 + .../tests/test_data/type_aliases/Nargo.toml | 1 + .../test_data/unconstrained_empty/Nargo.toml | 1 + .../nargo_cli/tests/test_data/unit/Nargo.toml | 1 + .../tests/test_data/vectors/Nargo.toml | 1 + .../test_data/workspace/crates/a/Nargo.toml | 3 +- .../test_data/workspace/crates/b/Nargo.toml | 3 +- .../workspace_default_member/a/Nargo.toml | 3 +- .../workspace_default_member/b/Nargo.toml | 1 + .../workspace_fail/crates/a/Nargo.toml | 3 +- .../workspace_fail/crates/b/Nargo.toml | 3 +- .../crates/b/Nargo.toml | 3 +- .../nargo_cli/tests/test_data/xor/Nargo.toml | 1 + .../tests/test_libraries/bad_impl/Nargo.toml | 1 + .../tests/test_libraries/bin_dep/Nargo.toml | 7 +++ .../tests/test_libraries/bin_dep/src/main.nr | 4 ++ .../test_libraries/diamond_deps_1/Nargo.toml | 1 + .../test_libraries/diamond_deps_2/Nargo.toml | 1 + crates/noirc_driver/src/lib.rs | 24 ++++---- crates/noirc_frontend/src/graph/mod.rs | 41 +++++-------- crates/noirc_frontend/src/hir/mod.rs | 11 +--- crates/wasm/src/compile.rs | 9 +-- 178 files changed, 484 insertions(+), 221 deletions(-) create mode 100644 crates/nargo_cli/tests/test_data/depend_on_bin/Nargo.toml create mode 100644 crates/nargo_cli/tests/test_data/depend_on_bin/Prover.toml create mode 100644 crates/nargo_cli/tests/test_data/depend_on_bin/src/main.nr create mode 100644 crates/nargo_cli/tests/test_libraries/bin_dep/Nargo.toml create mode 100644 crates/nargo_cli/tests/test_libraries/bin_dep/src/main.nr diff --git a/crates/lsp/src/lib.rs b/crates/lsp/src/lib.rs index 1c02c802808..df43dac4df7 100644 --- a/crates/lsp/src/lib.rs +++ b/crates/lsp/src/lib.rs @@ -24,10 +24,7 @@ use lsp_types::{ }; use noirc_driver::{check_crate, prepare_crate}; use noirc_errors::{DiagnosticKind, FileDiagnostic}; -use noirc_frontend::{ - graph::{CrateGraph, CrateType}, - hir::Context, -}; +use noirc_frontend::{graph::CrateGraph, hir::Context}; use serde_json::Value as JsonValue; use tower::Service; @@ -190,7 +187,7 @@ fn on_code_lens_request( } }; - let crate_id = prepare_crate(&mut context, file_path, CrateType::Binary); + let crate_id = prepare_crate(&mut context, file_path); // We ignore the warnings and errors produced by compilation for producing codelenses // because we can still get the test functions even if compilation fails @@ -283,7 +280,7 @@ fn on_did_save_text_document( } }; - let crate_id = prepare_crate(&mut context, file_path, CrateType::Binary); + let crate_id = prepare_crate(&mut context, file_path); let mut diagnostics = Vec::new(); diff --git a/crates/lsp/src/lib_hacky.rs b/crates/lsp/src/lib_hacky.rs index 13bb2b82847..2705c61238b 100644 --- a/crates/lsp/src/lib_hacky.rs +++ b/crates/lsp/src/lib_hacky.rs @@ -22,7 +22,7 @@ use lsp_types::{ use noirc_driver::{check_crate, prepare_crate, propagate_dep}; use noirc_errors::{DiagnosticKind, FileDiagnostic}; use noirc_frontend::{ - graph::{CrateGraph, CrateId, CrateType}, + graph::{CrateGraph, CrateId}, hir::Context, }; @@ -286,7 +286,7 @@ fn create_context_at_path( } let nargo_toml_path = find_nearest_parent_file(&file_path, &["Nargo.toml"]); - let current_crate_id = prepare_crate(&mut context, &file_path, CrateType::Binary); + let current_crate_id = prepare_crate(&mut context, &file_path); // TODO(AD): undo hacky dependency resolution if let Some(nargo_toml_path) = nargo_toml_path { @@ -297,7 +297,7 @@ fn create_context_at_path( .parent() .unwrap() // TODO .join(PathBuf::from(&dependency_path).join("src").join("lib.nr")); - let library_crate = prepare_crate(&mut context, &path_to_lib, CrateType::Library); + let library_crate = prepare_crate(&mut context, &path_to_lib); propagate_dep(&mut context, library_crate, &crate_name.parse().unwrap()); } } diff --git a/crates/nargo/src/package.rs b/crates/nargo/src/package.rs index 20c662b69f4..6c690fe9caf 100644 --- a/crates/nargo/src/package.rs +++ b/crates/nargo/src/package.rs @@ -1,19 +1,48 @@ -use std::{collections::BTreeMap, path::PathBuf}; +use std::{collections::BTreeMap, fmt::Display, path::PathBuf}; -use noirc_frontend::graph::{CrateName, CrateType}; +use noirc_frontend::graph::CrateName; use crate::constants::{PROVER_INPUT_FILE, VERIFIER_INPUT_FILE}; +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub enum PackageType { + Library, + Binary, +} + +impl Display for PackageType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Library => write!(f, "lib"), + Self::Binary => write!(f, "bin"), + } + } +} + #[derive(Clone)] pub enum Dependency { Local { package: Package }, Remote { package: Package }, } +impl Dependency { + pub fn is_binary(&self) -> bool { + match self { + Self::Local { package } | Self::Remote { package } => package.is_binary(), + } + } + + pub fn package_name(&self) -> &CrateName { + match self { + Self::Local { package } | Self::Remote { package } => &package.name, + } + } +} + #[derive(Clone)] pub struct Package { pub root_dir: PathBuf, - pub crate_type: CrateType, + pub package_type: PackageType, pub entry_path: PathBuf, pub name: CrateName, pub dependencies: BTreeMap, @@ -30,4 +59,12 @@ impl Package { // For now it is hard-coded to be toml. self.root_dir.join(format!("{VERIFIER_INPUT_FILE}.toml")) } + + pub fn is_binary(&self) -> bool { + self.package_type == PackageType::Binary + } + + pub fn is_library(&self) -> bool { + self.package_type == PackageType::Library + } } diff --git a/crates/nargo_cli/src/cli/check_cmd.rs b/crates/nargo_cli/src/cli/check_cmd.rs index 8f2e23ed750..1d292fbf188 100644 --- a/crates/nargo_cli/src/cli/check_cmd.rs +++ b/crates/nargo_cli/src/cli/check_cmd.rs @@ -1,5 +1,8 @@ use crate::{ - errors::CliError, find_package_manifest, manifest::resolve_workspace_from_toml, prepare_package, + errors::{CliError, CompileError}, + find_package_manifest, + manifest::resolve_workspace_from_toml, + prepare_package, }; use acvm::Backend; use clap::Args; @@ -7,7 +10,6 @@ use iter_extended::btree_map; use nargo::package::Package; use noirc_abi::{AbiParameter, AbiType, MAIN_RETURN_NAME}; use noirc_driver::{check_crate, compute_function_signature, CompileOptions}; -use noirc_errors::reporter::ReportedErrors; use noirc_frontend::{ graph::{CrateId, CrateName}, hir::Context, @@ -42,33 +44,37 @@ pub(crate) fn run( Ok(()) } -fn check_package( - package: &Package, - compile_options: &CompileOptions, -) -> Result<(), ReportedErrors> { +fn check_package(package: &Package, compile_options: &CompileOptions) -> Result<(), CompileError> { let (mut context, crate_id) = prepare_package(package); check_crate_and_report_errors(&mut context, crate_id, compile_options.deny_warnings)?; - // XXX: We can have a --overwrite flag to determine if you want to overwrite the Prover/Verifier.toml files - if let Some((parameters, return_type)) = compute_function_signature(&context, &crate_id) { - let path_to_prover_input = package.prover_input_path(); - let path_to_verifier_input = package.verifier_input_path(); + if package.is_library() { + // Libraries do not have ABIs. + Ok(()) + } else { + // XXX: We can have a --overwrite flag to determine if you want to overwrite the Prover/Verifier.toml files + if let Some((parameters, return_type)) = compute_function_signature(&context, &crate_id) { + let path_to_prover_input = package.prover_input_path(); + let path_to_verifier_input = package.verifier_input_path(); + + // If they are not available, then create them and populate them based on the ABI + if !path_to_prover_input.exists() { + let prover_toml = create_input_toml_template(parameters.clone(), None); + write_to_file(prover_toml.as_bytes(), &path_to_prover_input); + } + if !path_to_verifier_input.exists() { + let public_inputs = + parameters.into_iter().filter(|param| param.is_public()).collect(); - // If they are not available, then create them and populate them based on the ABI - if !path_to_prover_input.exists() { - let prover_toml = create_input_toml_template(parameters.clone(), None); - write_to_file(prover_toml.as_bytes(), &path_to_prover_input); - } - if !path_to_verifier_input.exists() { - let public_inputs = parameters.into_iter().filter(|param| param.is_public()).collect(); + let verifier_toml = create_input_toml_template(public_inputs, return_type); + write_to_file(verifier_toml.as_bytes(), &path_to_verifier_input); + } - let verifier_toml = create_input_toml_template(public_inputs, return_type); - write_to_file(verifier_toml.as_bytes(), &path_to_verifier_input); + Ok(()) + } else { + Err(CompileError::MissingMainFunction(package.name.clone())) } - } else { - // This means that this is a library. Libraries do not have ABIs. } - Ok(()) } /// Generates the contents of a toml file with fields for each of the passed parameters. @@ -223,7 +229,7 @@ pub(crate) fn check_crate_and_report_errors( context: &mut Context, crate_id: CrateId, deny_warnings: bool, -) -> Result<(), ReportedErrors> { +) -> Result<(), CompileError> { let result = check_crate(context, crate_id, deny_warnings).map(|warnings| ((), warnings)); super::compile_cmd::report_errors(result, context, deny_warnings) } diff --git a/crates/nargo_cli/src/cli/codegen_verifier_cmd.rs b/crates/nargo_cli/src/cli/codegen_verifier_cmd.rs index 0c01f8d5dc8..297b54fddb1 100644 --- a/crates/nargo_cli/src/cli/codegen_verifier_cmd.rs +++ b/crates/nargo_cli/src/cli/codegen_verifier_cmd.rs @@ -1,17 +1,20 @@ use std::path::PathBuf; -use super::fs::{ - common_reference_string::{ - read_cached_common_reference_string, update_common_reference_string, - write_cached_common_reference_string, +use super::NargoConfig; +use super::{ + compile_cmd::compile_package, + fs::{ + common_reference_string::{ + read_cached_common_reference_string, update_common_reference_string, + write_cached_common_reference_string, + }, + create_named_dir, + program::read_program_from_file, + write_to_file, }, - create_named_dir, - program::read_program_from_file, - write_to_file, }; -use super::NargoConfig; -use crate::{cli::compile_cmd::compile_circuit, errors::CliError}; -use crate::{find_package_manifest, manifest::resolve_workspace_from_toml, prepare_package}; +use crate::errors::CliError; +use crate::{find_package_manifest, manifest::resolve_workspace_from_toml}; use acvm::Backend; use clap::Args; use nargo::{ @@ -75,8 +78,7 @@ fn smart_contract_for_package( .map_err(CliError::CommonReferenceStringError)?; (common_reference_string, program) } else { - let (mut context, crate_id) = prepare_package(package); - let program = compile_circuit(backend, &mut context, crate_id, compile_options)?; + let (_, program) = compile_package(backend, package, compile_options)?; let common_reference_string = update_common_reference_string(backend, &common_reference_string, &program.circuit) .map_err(CliError::CommonReferenceStringError)?; diff --git a/crates/nargo_cli/src/cli/compile_cmd.rs b/crates/nargo_cli/src/cli/compile_cmd.rs index 2d59667e7ff..651992f0fd9 100644 --- a/crates/nargo_cli/src/cli/compile_cmd.rs +++ b/crates/nargo_cli/src/cli/compile_cmd.rs @@ -2,19 +2,19 @@ use acvm::acir::circuit::OpcodeLabel; use acvm::{acir::circuit::Circuit, Backend}; use iter_extended::try_vecmap; use iter_extended::vecmap; +use nargo::package::Package; use nargo::{artifacts::contract::PreprocessedContract, NargoError}; use noirc_driver::{ compile_contracts, compile_main, CompileOptions, CompiledProgram, ErrorsAndWarnings, Warnings, }; -use noirc_errors::reporter::ReportedErrors; -use noirc_frontend::graph::{CrateId, CrateName}; +use noirc_frontend::graph::CrateName; use noirc_frontend::hir::Context; use clap::Args; use nargo::ops::{preprocess_contract_function, preprocess_program}; -use crate::errors::CliError; +use crate::errors::{CliError, CompileError}; use crate::manifest::resolve_workspace_from_toml; use crate::{find_package_manifest, prepare_package}; @@ -108,8 +108,7 @@ pub(crate) fn run( } } else { for package in &workspace { - let (mut context, crate_id) = prepare_package(package); - let program = compile_circuit(backend, &mut context, crate_id, &args.compile_options)?; + let (_, program) = compile_package(backend, package, &args.compile_options)?; common_reference_string = update_common_reference_string(backend, &common_reference_string, &program.circuit) @@ -127,14 +126,18 @@ pub(crate) fn run( Ok(()) } -pub(crate) fn compile_circuit( +pub(crate) fn compile_package( backend: &B, - context: &mut Context, - crate_id: CrateId, + package: &Package, compile_options: &CompileOptions, -) -> Result { - let result = compile_main(context, crate_id, compile_options); - let mut program = report_errors(result, context, compile_options.deny_warnings)?; +) -> Result<(Context, CompiledProgram), CompileError> { + if package.is_library() { + return Err(CompileError::LibraryCrate(package.name.clone())); + } + + let (mut context, crate_id) = prepare_package(package); + let result = compile_main(&mut context, crate_id, compile_options); + let mut program = report_errors(result, &context, compile_options.deny_warnings)?; // Apply backend specific optimizations. let (optimized_circuit, opcode_labels) = optimize_circuit(backend, program.circuit) .expect("Backend does not support an opcode that is in the IR"); @@ -150,7 +153,7 @@ pub(crate) fn compile_circuit( }); program.debug.update_acir(opcode_ids); - Ok(program) + Ok((context, program)) } pub(super) fn optimize_circuit( @@ -171,7 +174,7 @@ pub(crate) fn report_errors( result: Result<(T, Warnings), ErrorsAndWarnings>, context: &Context, deny_warnings: bool, -) -> Result { +) -> Result { let (t, warnings) = result.map_err(|errors| { noirc_errors::reporter::report_all(&context.file_manager, &errors, deny_warnings) })?; diff --git a/crates/nargo_cli/src/cli/execute_cmd.rs b/crates/nargo_cli/src/cli/execute_cmd.rs index a2700caee0f..fa6b13a5134 100644 --- a/crates/nargo_cli/src/cli/execute_cmd.rs +++ b/crates/nargo_cli/src/cli/execute_cmd.rs @@ -12,12 +12,12 @@ use noirc_errors::{debug_info::DebugInfo, CustomDiagnostic}; use noirc_frontend::graph::CrateName; use noirc_frontend::hir::Context; -use super::compile_cmd::compile_circuit; +use super::compile_cmd::compile_package; use super::fs::{inputs::read_inputs_from_file, witness::save_witness_to_dir}; use super::NargoConfig; use crate::errors::CliError; +use crate::find_package_manifest; use crate::manifest::resolve_workspace_from_toml; -use crate::{find_package_manifest, prepare_package}; /// Executes a circuit to calculate its return value #[derive(Debug, Clone, Args)] @@ -69,8 +69,7 @@ fn execute_package( prover_name: &str, compile_options: &CompileOptions, ) -> Result<(Option, WitnessMap), CliError> { - let (mut context, crate_id) = prepare_package(package); - let compiled_program = compile_circuit(backend, &mut context, crate_id, compile_options)?; + let (context, compiled_program) = compile_package(backend, package, compile_options)?; let CompiledProgram { abi, circuit, debug } = compiled_program; // Parse the initial witness values from Prover.toml diff --git a/crates/nargo_cli/src/cli/info_cmd.rs b/crates/nargo_cli/src/cli/info_cmd.rs index 1a834bdd78e..bfa0e7985db 100644 --- a/crates/nargo_cli/src/cli/info_cmd.rs +++ b/crates/nargo_cli/src/cli/info_cmd.rs @@ -5,8 +5,8 @@ use noirc_driver::CompileOptions; use noirc_frontend::graph::CrateName; use crate::{ - cli::compile_cmd::compile_circuit, errors::CliError, find_package_manifest, - manifest::resolve_workspace_from_toml, prepare_package, + cli::compile_cmd::compile_package, errors::CliError, find_package_manifest, + manifest::resolve_workspace_from_toml, }; use super::NargoConfig; @@ -46,8 +46,7 @@ fn count_opcodes_and_gates_in_package( package: &Package, compile_options: &CompileOptions, ) -> Result<(), CliError> { - let (mut context, crate_id) = prepare_package(package); - let compiled_program = compile_circuit(backend, &mut context, crate_id, compile_options)?; + let (_, compiled_program) = compile_package(backend, package, compile_options)?; let num_opcodes = compiled_program.circuit.opcodes.len(); diff --git a/crates/nargo_cli/src/cli/init_cmd.rs b/crates/nargo_cli/src/cli/init_cmd.rs index a1d4576758a..edfb9c3410c 100644 --- a/crates/nargo_cli/src/cli/init_cmd.rs +++ b/crates/nargo_cli/src/cli/init_cmd.rs @@ -5,6 +5,7 @@ use super::{NargoConfig, CARGO_PKG_VERSION}; use acvm::Backend; use clap::Args; use nargo::constants::{PKG_FILE, SRC_DIR}; +use nargo::package::PackageType; use std::path::PathBuf; /// Create a Noir project in the current directory. @@ -13,9 +14,17 @@ pub(crate) struct InitCommand { /// Name of the package [default: current directory name] #[clap(long)] name: Option, + + /// Use a library template + #[arg(long, conflicts_with = "bin")] + pub(crate) lib: bool, + + /// Use a binary template [default] + #[arg(long, conflicts_with = "lib")] + pub(crate) bin: bool, } -const EXAMPLE: &str = r#"fn main(x : Field, y : pub Field) { +const BIN_EXAMPLE: &str = r#"fn main(x : Field, y : pub Field) { assert(x != y); } @@ -28,6 +37,19 @@ fn test_main() { } "#; +const LIB_EXAMPLE: &str = r#"fn my_util(x : Field, y : Field) -> bool { + x != y +} + +#[test] +fn test_my_util() { + assert(my_util(1, 2)); + + // Uncomment to make test fail + // assert(my_util(1, 1)); +} +"#; + pub(crate) fn run( // Backend is currently unused, but we might want to use it to inform the "new" template in the future _backend: &B, @@ -38,19 +60,24 @@ pub(crate) fn run( .name .unwrap_or_else(|| config.program_dir.file_name().unwrap().to_str().unwrap().to_owned()); - initialize_project(config.program_dir, &package_name); + let package_type = if args.lib { PackageType::Library } else { PackageType::Binary }; + initialize_project(config.program_dir, &package_name, package_type); Ok(()) } /// Initializes a new Noir project in `package_dir`. -pub(crate) fn initialize_project(package_dir: PathBuf, package_name: &str) { - // TODO: Should this reject if we have non-Unicode filepaths? +pub(crate) fn initialize_project( + package_dir: PathBuf, + package_name: &str, + package_type: PackageType, +) { let src_dir = package_dir.join(SRC_DIR); create_named_dir(&src_dir, "src"); let toml_contents = format!( r#"[package] name = "{package_name}" +type = "{package_type}" authors = [""] compiler_version = "{CARGO_PKG_VERSION}" @@ -58,6 +85,10 @@ compiler_version = "{CARGO_PKG_VERSION}" ); write_to_file(toml_contents.as_bytes(), &package_dir.join(PKG_FILE)); - write_to_file(EXAMPLE.as_bytes(), &src_dir.join("main.nr")); - println!("Project successfully created! Binary located at {}", package_dir.display()); + // This uses the `match` syntax instead of `if` so we get a compile error when we add new package types (which likely need new template files) + match package_type { + PackageType::Binary => write_to_file(BIN_EXAMPLE.as_bytes(), &src_dir.join("main.nr")), + PackageType::Library => write_to_file(LIB_EXAMPLE.as_bytes(), &src_dir.join("lib.nr")), + }; + println!("Project successfully created! It is located at {}", package_dir.display()); } diff --git a/crates/nargo_cli/src/cli/mod.rs b/crates/nargo_cli/src/cli/mod.rs index 9d494b21e6a..3ec23d8ed58 100644 --- a/crates/nargo_cli/src/cli/mod.rs +++ b/crates/nargo_cli/src/cli/mod.rs @@ -94,10 +94,7 @@ mod tests { use fm::FileManager; use noirc_driver::{check_crate, prepare_crate}; use noirc_errors::reporter; - use noirc_frontend::{ - graph::{CrateGraph, CrateType}, - hir::Context, - }; + use noirc_frontend::{graph::CrateGraph, hir::Context}; use std::path::{Path, PathBuf}; @@ -110,7 +107,7 @@ mod tests { let fm = FileManager::new(root_dir); let graph = CrateGraph::default(); let mut context = Context::new(fm, graph); - let crate_id = prepare_crate(&mut context, root_file, CrateType::Binary); + let crate_id = prepare_crate(&mut context, root_file); let result = check_crate(&mut context, crate_id, false); let success = result.is_ok(); diff --git a/crates/nargo_cli/src/cli/new_cmd.rs b/crates/nargo_cli/src/cli/new_cmd.rs index a792e752a51..e67a046293d 100644 --- a/crates/nargo_cli/src/cli/new_cmd.rs +++ b/crates/nargo_cli/src/cli/new_cmd.rs @@ -1,8 +1,12 @@ use crate::errors::CliError; -use super::{init_cmd::initialize_project, NargoConfig}; +use super::{ + init_cmd::{initialize_project, InitCommand}, + NargoConfig, +}; use acvm::Backend; use clap::Args; +use nargo::package::PackageType; use std::path::PathBuf; /// Create a Noir project in a new directory. @@ -14,6 +18,9 @@ pub(crate) struct NewCommand { /// Name of the package [default: package directory name] #[clap(long)] name: Option, + + #[clap(flatten)] + init_config: InitCommand, } pub(crate) fn run( @@ -30,6 +37,8 @@ pub(crate) fn run( let package_name = args.name.unwrap_or_else(|| args.path.file_name().unwrap().to_str().unwrap().to_owned()); - initialize_project(package_dir, &package_name); + let package_type = + if args.init_config.lib { PackageType::Library } else { PackageType::Binary }; + initialize_project(package_dir, &package_name, package_type); Ok(()) } diff --git a/crates/nargo_cli/src/cli/prove_cmd.rs b/crates/nargo_cli/src/cli/prove_cmd.rs index cdf83f9759b..d7eaf2d1405 100644 --- a/crates/nargo_cli/src/cli/prove_cmd.rs +++ b/crates/nargo_cli/src/cli/prove_cmd.rs @@ -10,7 +10,7 @@ use noirc_abi::input_parser::Format; use noirc_driver::CompileOptions; use noirc_frontend::graph::CrateName; -use super::compile_cmd::compile_circuit; +use super::compile_cmd::compile_package; use super::fs::{ common_reference_string::{ read_cached_common_reference_string, update_common_reference_string, @@ -21,9 +21,9 @@ use super::fs::{ proof::save_proof_to_dir, }; use super::NargoConfig; +use crate::find_package_manifest; use crate::manifest::resolve_workspace_from_toml; use crate::{cli::execute_cmd::execute_program, errors::CliError}; -use crate::{find_package_manifest, prepare_package}; /// Create proof for this program. The proof is returned as a hex encoded string. #[derive(Debug, Clone, Args)] @@ -96,8 +96,7 @@ pub(crate) fn prove_package( .map_err(CliError::CommonReferenceStringError)?; (common_reference_string, program, None) } else { - let (mut context, crate_id) = prepare_package(package); - let program = compile_circuit(backend, &mut context, crate_id, compile_options)?; + let (context, program) = compile_package(backend, package, compile_options)?; let common_reference_string = update_common_reference_string(backend, &common_reference_string, &program.circuit) .map_err(CliError::CommonReferenceStringError)?; diff --git a/crates/nargo_cli/src/cli/verify_cmd.rs b/crates/nargo_cli/src/cli/verify_cmd.rs index 78b23a0612d..cceaf997af7 100644 --- a/crates/nargo_cli/src/cli/verify_cmd.rs +++ b/crates/nargo_cli/src/cli/verify_cmd.rs @@ -1,17 +1,19 @@ -use super::compile_cmd::compile_circuit; -use super::fs::{ - common_reference_string::{ - read_cached_common_reference_string, update_common_reference_string, - write_cached_common_reference_string, +use super::NargoConfig; +use super::{ + compile_cmd::compile_package, + fs::{ + common_reference_string::{ + read_cached_common_reference_string, update_common_reference_string, + write_cached_common_reference_string, + }, + inputs::read_inputs_from_file, + load_hex_data, + program::read_program_from_file, }, - inputs::read_inputs_from_file, - load_hex_data, - program::read_program_from_file, }; -use super::NargoConfig; use crate::errors::CliError; +use crate::find_package_manifest; use crate::manifest::resolve_workspace_from_toml; -use crate::{find_package_manifest, prepare_package}; use acvm::Backend; use clap::Args; @@ -82,8 +84,7 @@ fn verify_package( .map_err(CliError::CommonReferenceStringError)?; (common_reference_string, program) } else { - let (mut context, crate_id) = prepare_package(package); - let program = compile_circuit(backend, &mut context, crate_id, compile_options)?; + let (_, program) = compile_package(backend, package, compile_options)?; let common_reference_string = update_common_reference_string(backend, &common_reference_string, &program.circuit) .map_err(CliError::CommonReferenceStringError)?; diff --git a/crates/nargo_cli/src/errors.rs b/crates/nargo_cli/src/errors.rs index 00a84ff2964..45d2dbae827 100644 --- a/crates/nargo_cli/src/errors.rs +++ b/crates/nargo_cli/src/errors.rs @@ -3,9 +3,10 @@ use acvm::{ SmartContract, }; use hex::FromHexError; -use nargo::NargoError; +use nargo::{package::PackageType, NargoError}; use noirc_abi::errors::{AbiError, InputParserError}; use noirc_errors::reporter::ReportedErrors; +use noirc_frontend::graph::CrateName; use std::path::PathBuf; use thiserror::Error; @@ -39,11 +40,6 @@ pub(crate) enum CliError { #[error("Failed to verify proof {}", .0.display())] InvalidProof(PathBuf), - /// Errors encountered while compiling the noir program. - /// These errors are already written to stderr. - #[error("Aborting due to {} previous error{}", .0.error_count, if .0.error_count == 1 { "" } else { "s" })] - ReportedErrors(ReportedErrors), - /// ABI encoding/decoding error #[error(transparent)] AbiError(#[from] AbiError), @@ -63,6 +59,10 @@ pub(crate) enum CliError { #[error(transparent)] ManifestError(#[from] ManifestError), + /// Error from the compilation pipeline + #[error(transparent)] + CompileError(#[from] CompileError), + /// Backend error caused by a function on the SmartContract trait #[error(transparent)] SmartContractError(::Error), // Unfortunately, Rust won't let us `impl From` over an Associated Type on a generic @@ -76,7 +76,22 @@ pub(crate) enum CliError { CommonReferenceStringError(::Error), // Unfortunately, Rust won't let us `impl From` over an Associated Type on a generic } -impl From for CliError { +/// Errors covering situations where a package cannot be compiled. +#[derive(Debug, Error)] +pub(crate) enum CompileError { + #[error("Package `{0}` has type `lib` but only `bin` types can be compiled")] + LibraryCrate(CrateName), + + #[error("Package `{0}` is expected to have a `main` function but it does not")] + MissingMainFunction(CrateName), + + /// Errors encountered while compiling the Noir program. + /// These errors are already written to stderr. + #[error("Aborting due to {} previous error{}", .0.error_count, if .0.error_count == 1 { "" } else { "s" })] + ReportedErrors(ReportedErrors), +} + +impl From for CompileError { fn from(errors: ReportedErrors) -> Self { Self::ReportedErrors(errors) } @@ -89,12 +104,18 @@ pub(crate) enum ManifestError { #[error("cannot find a Nargo.toml in {}", .0.display())] MissingFile(PathBuf), - #[error("Cannot read file {0}. Does it exist?")] + #[error("Cannot read file {0} - does it exist?")] ReadFailed(PathBuf), #[error("Nargo.toml is missing a parent directory")] MissingParent, + #[error("Missing `type` field in {0}")] + MissingPackageType(PathBuf), + + #[error("Cannot use `{1}` for `type` field in {0}")] + InvalidPackageType(PathBuf, String), + /// Package manifest is unreadable. #[error("Nargo.toml is badly formed, could not parse.\n\n {0}")] MalformedFile(#[from] toml::de::Error), @@ -102,17 +123,8 @@ pub(crate) enum ManifestError { #[error("Unxpected workspace definition found in {0}")] UnexpectedWorkspace(PathBuf), - /// Package does not contain Noir source files. - #[error("cannot find src directory in path {0}")] - NoSourceDir(PathBuf), - - /// Package has neither of `main.nr` and `lib.nr`. - #[error("package must contain either a `lib.nr`(Library) or a `main.nr`(Binary).")] - ContainsZeroCrates, - - /// Package has both a `main.nr` (for binaries) and `lib.nr` (for libraries) - #[error("package cannot contain both a `lib.nr` and a `main.nr`")] - ContainsMultipleCrates, + #[error("Cannot find file {0} which is required due to specifying the `{1}` package type")] + MissingEntryFile(PathBuf, PackageType), /// Invalid character `-` in package name #[error("invalid character `-` in package name")] @@ -122,9 +134,12 @@ pub(crate) enum ManifestError { #[error("{0}")] GitError(String), - #[error("Selected package ({0}) was not found")] - MissingSelectedPackage(String), + #[error("Selected package `{0}` was not found")] + MissingSelectedPackage(CrateName), #[error("Default package was not found. Does {0} exist in your workspace?")] MissingDefaultPackage(PathBuf), + + #[error("Package `{0}` has type `bin` but you cannot depend on binary packages")] + BinaryDependency(CrateName), } diff --git a/crates/nargo_cli/src/lib.rs b/crates/nargo_cli/src/lib.rs index 9cebbdabe5f..d90ce39259d 100644 --- a/crates/nargo_cli/src/lib.rs +++ b/crates/nargo_cli/src/lib.rs @@ -11,7 +11,7 @@ use fm::FileManager; use nargo::package::{Dependency, Package}; use noirc_driver::{add_dep, prepare_crate}; use noirc_frontend::{ - graph::{CrateGraph, CrateId, CrateName, CrateType}, + graph::{CrateGraph, CrateId, CrateName}, hir::Context, }; use std::{ @@ -54,23 +54,6 @@ fn find_package_manifest(current_path: &Path) -> Result .ok_or_else(|| ManifestError::MissingFile(current_path.to_path_buf())) } -fn lib_or_bin(root_dir: impl AsRef) -> Result<(PathBuf, CrateType), ManifestError> { - let current_path = root_dir.as_ref(); - // A library has a lib.nr and a binary has a main.nr - // You cannot have both. - let src_path = find_dir(current_path, "src") - .ok_or_else(|| ManifestError::NoSourceDir(current_path.to_path_buf()))?; - - let lib_nr_path = find_file(&src_path, "lib", "nr"); - let bin_nr_path = find_file(&src_path, "main", "nr"); - match (lib_nr_path, bin_nr_path) { - (Some(_), Some(_)) => Err(ManifestError::ContainsMultipleCrates), - (None, Some(path)) => Ok((path, CrateType::Binary)), - (Some(path), None) => Ok((path, CrateType::Library)), - (None, None) => Err(ManifestError::ContainsZeroCrates), - } -} - // Looks for file named `file_name` in path fn find_file>(path: P, file_name: &str, extension: &str) -> Option { let entries = list_files_and_folders_in(path)?; @@ -79,12 +62,6 @@ fn find_file>(path: P, file_name: &str, extension: &str) -> Optio find_artifact(entries, &file_name) } -// Looks for directory named `dir_name` in path -fn find_dir>(path: P, dir_name: &str) -> Option { - let entries = list_files_and_folders_in(path)?; - find_artifact(entries, dir_name) -} - // There is no distinction between files and folders fn find_artifact(entries: ReadDir, artifact_name: &str) -> Option { let entry = entries @@ -107,7 +84,7 @@ fn prepare_dependencies( for (dep_name, dep) in dependencies.iter() { match dep { Dependency::Remote { package } | Dependency::Local { package } => { - let crate_id = prepare_crate(context, &package.entry_path, package.crate_type); + let crate_id = prepare_crate(context, &package.entry_path); add_dep(context, parent_crate, crate_id, dep_name.clone()); prepare_dependencies(context, crate_id, &package.dependencies); } @@ -120,7 +97,7 @@ fn prepare_package(package: &Package) -> (Context, CrateId) { let graph = CrateGraph::default(); let mut context = Context::new(fm, graph); - let crate_id = prepare_crate(&mut context, &package.entry_path, package.crate_type); + let crate_id = prepare_crate(&mut context, &package.entry_path); prepare_dependencies(&mut context, crate_id, &package.dependencies); diff --git a/crates/nargo_cli/src/manifest.rs b/crates/nargo_cli/src/manifest.rs index 0a17f62a7a4..c376c85b441 100644 --- a/crates/nargo_cli/src/manifest.rs +++ b/crates/nargo_cli/src/manifest.rs @@ -3,8 +3,9 @@ use std::{ path::{Path, PathBuf}, }; +use fm::{NormalizePath, FILE_EXTENSION}; use nargo::{ - package::{Dependency, Package}, + package::{Dependency, Package, PackageType}, workspace::Workspace, }; use noirc_frontend::graph::CrateName; @@ -31,9 +32,34 @@ impl PackageConfig { dependencies.insert(name, resolved_dep); } - let (entry_path, crate_type) = crate::lib_or_bin(root_dir)?; - - Ok(Package { root_dir: root_dir.to_path_buf(), entry_path, crate_type, name, dependencies }) + let package_type = match self.package.package_type.as_deref() { + Some("lib") => PackageType::Library, + Some("bin") => PackageType::Binary, + Some(invalid) => { + return Err(ManifestError::InvalidPackageType( + root_dir.join("Nargo.toml"), + invalid.to_string(), + )) + } + None => return Err(ManifestError::MissingPackageType(root_dir.join("Nargo.toml"))), + }; + + let entry_path = match package_type { + PackageType::Library => root_dir.join("src").join("lib").with_extension(FILE_EXTENSION), + PackageType::Binary => root_dir.join("src").join("main").with_extension(FILE_EXTENSION), + }; + + if entry_path.exists() { + Ok(Package { + root_dir: root_dir.to_path_buf(), + entry_path, + package_type, + name, + dependencies, + }) + } else { + Err(ManifestError::MissingEntryFile(entry_path, package_type)) + } } } @@ -89,6 +115,8 @@ struct WorkspaceConfig { struct PackageMetadata { #[serde(default = "panic_missing_name")] name: String, + #[serde(alias = "type")] + package_type: Option, description: Option, authors: Option>, // If not compiler version is supplied, the latest is used @@ -132,19 +160,27 @@ enum DependencyConfig { impl DependencyConfig { fn resolve_to_dependency(&self, pkg_root: &Path) -> Result { - match self { + let dep = match self { Self::Github { git, tag } => { let dir_path = clone_git_repo(git, tag).map_err(ManifestError::GitError)?; let toml_path = dir_path.join("Nargo.toml"); let package = resolve_package_from_toml(&toml_path)?; - Ok(Dependency::Remote { package }) + Dependency::Remote { package } } Self::Path { path } => { let dir_path = pkg_root.join(path); let toml_path = dir_path.join("Nargo.toml"); let package = resolve_package_from_toml(&toml_path)?; - Ok(Dependency::Local { package }) + Dependency::Local { package } } + }; + + // Cannot depend on a binary + // TODO: Can we depend upon contracts? + if dep.is_binary() { + Err(ManifestError::BinaryDependency(dep.package_name().clone())) + } else { + Ok(dep) } } } @@ -163,7 +199,7 @@ fn toml_to_workspace( members: vec![member], } } else { - return Err(ManifestError::MissingSelectedPackage(member.name.into())); + return Err(ManifestError::MissingSelectedPackage(member.name)); } } Config::Workspace { workspace_config } => { @@ -194,7 +230,7 @@ fn toml_to_workspace( // we want to present an error to users if selected_package_index.is_none() { if let Some(selected_name) = selected_package { - return Err(ManifestError::MissingSelectedPackage(selected_name.into())); + return Err(ManifestError::MissingSelectedPackage(selected_name)); } if let Some(default_path) = workspace_config.default_member { return Err(ManifestError::MissingDefaultPackage(default_path)); @@ -209,7 +245,8 @@ fn toml_to_workspace( } fn read_toml(toml_path: &Path) -> Result { - let toml_as_string = std::fs::read_to_string(toml_path) + let toml_path = toml_path.normalize(); + let toml_as_string = std::fs::read_to_string(&toml_path) .map_err(|_| ManifestError::ReadFailed(toml_path.to_path_buf()))?; let root_dir = toml_path.parent().ok_or(ManifestError::MissingParent)?; let nargo_toml = diff --git a/crates/nargo_cli/tests/target_tests_data/fail/basic/Nargo.toml b/crates/nargo_cli/tests/target_tests_data/fail/basic/Nargo.toml index a4994991fcc..f87e0b49bde 100644 --- a/crates/nargo_cli/tests/target_tests_data/fail/basic/Nargo.toml +++ b/crates/nargo_cli/tests/target_tests_data/fail/basic/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "fail_basic" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/target_tests_data/fail/dup_func/Nargo.toml b/crates/nargo_cli/tests/target_tests_data/fail/dup_func/Nargo.toml index 625528a8c75..449a8fd7f73 100644 --- a/crates/nargo_cli/tests/target_tests_data/fail/dup_func/Nargo.toml +++ b/crates/nargo_cli/tests/target_tests_data/fail/dup_func/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "fail_dup_func" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/target_tests_data/pass/basic/Nargo.toml b/crates/nargo_cli/tests/target_tests_data/pass/basic/Nargo.toml index 6c64f17234f..8c9a08e4d19 100644 --- a/crates/nargo_cli/tests/target_tests_data/pass/basic/Nargo.toml +++ b/crates/nargo_cli/tests/target_tests_data/pass/basic/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "pass_basic" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/target_tests_data/pass/import/Nargo.toml b/crates/nargo_cli/tests/target_tests_data/pass/import/Nargo.toml index 87856bfb269..e6ba22f9b14 100644 --- a/crates/nargo_cli/tests/target_tests_data/pass/import/Nargo.toml +++ b/crates/nargo_cli/tests/target_tests_data/pass/import/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "pass_import" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/target_tests_data/pass_dev_mode/unused/Nargo.toml b/crates/nargo_cli/tests/target_tests_data/pass_dev_mode/unused/Nargo.toml index f25b40c494d..f076963a94e 100644 --- a/crates/nargo_cli/tests/target_tests_data/pass_dev_mode/unused/Nargo.toml +++ b/crates/nargo_cli/tests/target_tests_data/pass_dev_mode/unused/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "pass_dev_mode_unused" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/1327_concrete_in_generic/Nargo.toml b/crates/nargo_cli/tests/test_data/1327_concrete_in_generic/Nargo.toml index 84bcfa59445..0ccf7ff8c9c 100644 --- a/crates/nargo_cli/tests/test_data/1327_concrete_in_generic/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/1327_concrete_in_generic/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "1327_concrete_in_generic" +type = "bin" authors = [""] compiler_version = "0.6.0" diff --git a/crates/nargo_cli/tests/test_data/1_mul/Nargo.toml b/crates/nargo_cli/tests/test_data/1_mul/Nargo.toml index 3a08d792ed5..29053e36f7c 100644 --- a/crates/nargo_cli/tests/test_data/1_mul/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/1_mul/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "1_mul" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/2_div/Nargo.toml b/crates/nargo_cli/tests/test_data/2_div/Nargo.toml index 3ddfc94b016..6b28c58bea2 100644 --- a/crates/nargo_cli/tests/test_data/2_div/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/2_div/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "2_div" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/3_add/Nargo.toml b/crates/nargo_cli/tests/test_data/3_add/Nargo.toml index dd2b3ff8b0e..dca0a0d9931 100644 --- a/crates/nargo_cli/tests/test_data/3_add/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/3_add/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "3_add" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/4_sub/Nargo.toml b/crates/nargo_cli/tests/test_data/4_sub/Nargo.toml index 481edc68308..149c3a6f7e5 100644 --- a/crates/nargo_cli/tests/test_data/4_sub/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/4_sub/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "4_sub" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/5_over/Nargo.toml b/crates/nargo_cli/tests/test_data/5_over/Nargo.toml index 8d54313a873..a59347066c9 100644 --- a/crates/nargo_cli/tests/test_data/5_over/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/5_over/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "5_over" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/6/Nargo.toml b/crates/nargo_cli/tests/test_data/6/Nargo.toml index 7ef042e85cf..b0353fb6ae5 100644 --- a/crates/nargo_cli/tests/test_data/6/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/6/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "6" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/6_array/Nargo.toml b/crates/nargo_cli/tests/test_data/6_array/Nargo.toml index ad8fc83dbd7..4a6d8e1f401 100644 --- a/crates/nargo_cli/tests/test_data/6_array/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/6_array/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "6_array" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/7/Nargo.toml b/crates/nargo_cli/tests/test_data/7/Nargo.toml index cd5a4d21b38..9321253ec03 100644 --- a/crates/nargo_cli/tests/test_data/7/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/7/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "7" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/7_function/Nargo.toml b/crates/nargo_cli/tests/test_data/7_function/Nargo.toml index 42672a980c8..ea899378643 100644 --- a/crates/nargo_cli/tests/test_data/7_function/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/7_function/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "7_function" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/8_integration/Nargo.toml b/crates/nargo_cli/tests/test_data/8_integration/Nargo.toml index ca21221bc78..56a156ee1d7 100644 --- a/crates/nargo_cli/tests/test_data/8_integration/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/8_integration/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "8_integration" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/9_conditional/Nargo.toml b/crates/nargo_cli/tests/test_data/9_conditional/Nargo.toml index 7c447ce2f0a..3aa36068cf2 100644 --- a/crates/nargo_cli/tests/test_data/9_conditional/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/9_conditional/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "9_conditional" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/arithmetic_binary_operations/Nargo.toml b/crates/nargo_cli/tests/test_data/arithmetic_binary_operations/Nargo.toml index 4fde96957fc..7bacc45d7d1 100644 --- a/crates/nargo_cli/tests/test_data/arithmetic_binary_operations/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/arithmetic_binary_operations/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "arithmetic_binary_operations" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/array_dynamic/Nargo.toml b/crates/nargo_cli/tests/test_data/array_dynamic/Nargo.toml index c5e05dfc6d7..17b38706704 100644 --- a/crates/nargo_cli/tests/test_data/array_dynamic/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/array_dynamic/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "array_dynamic" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/array_len/Nargo.toml b/crates/nargo_cli/tests/test_data/array_len/Nargo.toml index 9e417be06ee..b54cea7cc17 100644 --- a/crates/nargo_cli/tests/test_data/array_len/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/array_len/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "array_len" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/array_neq/Nargo.toml b/crates/nargo_cli/tests/test_data/array_neq/Nargo.toml index a697bd06f0d..0539cceb542 100644 --- a/crates/nargo_cli/tests/test_data/array_neq/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/array_neq/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "array_neq" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/array_sort/Nargo.toml b/crates/nargo_cli/tests/test_data/array_sort/Nargo.toml index 7adf0793369..f5f469c5a5f 100644 --- a/crates/nargo_cli/tests/test_data/array_sort/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/array_sort/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "array_sort" +type = "bin" authors = [""] compiler_version = "0.6.0" diff --git a/crates/nargo_cli/tests/test_data/assert/Nargo.toml b/crates/nargo_cli/tests/test_data/assert/Nargo.toml index 238d13b2fd0..17ed9362bef 100644 --- a/crates/nargo_cli/tests/test_data/assert/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/assert/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "assert" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/assert_statement/Nargo.toml b/crates/nargo_cli/tests/test_data/assert_statement/Nargo.toml index 6910160df8a..641cb1b00e0 100644 --- a/crates/nargo_cli/tests/test_data/assert_statement/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/assert_statement/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "assert_statement" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/assign_ex/Nargo.toml b/crates/nargo_cli/tests/test_data/assign_ex/Nargo.toml index 626db95708d..2ca969eeb93 100644 --- a/crates/nargo_cli/tests/test_data/assign_ex/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/assign_ex/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "assign_ex" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/bit_and/Nargo.toml b/crates/nargo_cli/tests/test_data/bit_and/Nargo.toml index 85fa0fe68bf..71a98db6635 100644 --- a/crates/nargo_cli/tests/test_data/bit_and/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/bit_and/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "bit_and" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/bit_shifts_comptime/Nargo.toml b/crates/nargo_cli/tests/test_data/bit_shifts_comptime/Nargo.toml index ee49e18e2fa..9b7aa319406 100644 --- a/crates/nargo_cli/tests/test_data/bit_shifts_comptime/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/bit_shifts_comptime/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "bit_shifts_comptime" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/bit_shifts_runtime/Nargo.toml b/crates/nargo_cli/tests/test_data/bit_shifts_runtime/Nargo.toml index 661f4f937d5..3f9058f1946 100644 --- a/crates/nargo_cli/tests/test_data/bit_shifts_runtime/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/bit_shifts_runtime/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "bit_shifts_runtime" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/blackbox_func_simple_call/Nargo.toml b/crates/nargo_cli/tests/test_data/blackbox_func_simple_call/Nargo.toml index 83ef3cb9f72..75c652d2f50 100644 --- a/crates/nargo_cli/tests/test_data/blackbox_func_simple_call/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/blackbox_func_simple_call/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "blackbox_func_simple_call" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/bool_not/Nargo.toml b/crates/nargo_cli/tests/test_data/bool_not/Nargo.toml index bb778dbd2b2..c2521450344 100644 --- a/crates/nargo_cli/tests/test_data/bool_not/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/bool_not/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "bool_not" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/bool_or/Nargo.toml b/crates/nargo_cli/tests/test_data/bool_or/Nargo.toml index 7f59fb62cbc..a878c1acb38 100644 --- a/crates/nargo_cli/tests/test_data/bool_or/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/bool_or/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "bool_or" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_acir_as_brillig/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_acir_as_brillig/Nargo.toml index 162794d7c5c..42b3c71aad3 100644 --- a/crates/nargo_cli/tests/test_data/brillig_acir_as_brillig/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_acir_as_brillig/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_acir_as_brillig" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_arrays/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_arrays/Nargo.toml index be36814c2b3..abaa6680f84 100644 --- a/crates/nargo_cli/tests/test_data/brillig_arrays/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_arrays/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_arrays" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_assert/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_assert/Nargo.toml index 0b21db6224a..c6a27b47e79 100644 --- a/crates/nargo_cli/tests/test_data/brillig_assert/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_assert/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_assert" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_assert_fail/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_assert_fail/Nargo.toml index eed13cc504f..181af302d8f 100644 --- a/crates/nargo_cli/tests/test_data/brillig_assert_fail/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_assert_fail/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_assert_fail" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_blake2s/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_blake2s/Nargo.toml index 25457595d0e..8fc7df96fc3 100644 --- a/crates/nargo_cli/tests/test_data/brillig_blake2s/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_blake2s/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_blake2s" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_calls/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_calls/Nargo.toml index 3a9f6752568..9b6b4bd357b 100644 --- a/crates/nargo_cli/tests/test_data/brillig_calls/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_calls/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_calls" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_calls_array/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_calls_array/Nargo.toml index 38e1bc8d076..0c60f6218eb 100644 --- a/crates/nargo_cli/tests/test_data/brillig_calls_array/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_calls_array/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_calls_array" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_calls_conditionals/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_calls_conditionals/Nargo.toml index 771d014c490..f99445381d3 100644 --- a/crates/nargo_cli/tests/test_data/brillig_calls_conditionals/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_calls_conditionals/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_calls_conditionals" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_cast/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_cast/Nargo.toml index dc6b7bff66c..7c5aebabb95 100644 --- a/crates/nargo_cli/tests/test_data/brillig_cast/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_cast/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_cast" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_conditional/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_conditional/Nargo.toml index bb54f910f77..7432f303349 100644 --- a/crates/nargo_cli/tests/test_data/brillig_conditional/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_conditional/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_conditional" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_ecdsa/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_ecdsa/Nargo.toml index 855646aec2c..96ffe8f1c92 100644 --- a/crates/nargo_cli/tests/test_data/brillig_ecdsa/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_ecdsa/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_ecdsa" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_field_binary_operations/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_field_binary_operations/Nargo.toml index 632b97a07bc..a8e7cd167d2 100644 --- a/crates/nargo_cli/tests/test_data/brillig_field_binary_operations/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_field_binary_operations/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_field_binary_operations" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_fns_as_values/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_fns_as_values/Nargo.toml index 3586fbf4dc0..fd94bfb3a60 100644 --- a/crates/nargo_cli/tests/test_data/brillig_fns_as_values/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_fns_as_values/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_fns_as_values" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_hash_to_field/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_hash_to_field/Nargo.toml index d04836585d4..a7d75459f7e 100644 --- a/crates/nargo_cli/tests/test_data/brillig_hash_to_field/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_hash_to_field/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_hash_to_field" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_identity_function/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_identity_function/Nargo.toml index c7af537cbde..1c7603a5660 100644 --- a/crates/nargo_cli/tests/test_data/brillig_identity_function/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_identity_function/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_identity_function" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_integer_binary_operations/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_integer_binary_operations/Nargo.toml index 11360984c59..09b851e7c5c 100644 --- a/crates/nargo_cli/tests/test_data/brillig_integer_binary_operations/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_integer_binary_operations/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_integer_binary_operations" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_keccak/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_keccak/Nargo.toml index f247567f4ee..358c7c63a60 100644 --- a/crates/nargo_cli/tests/test_data/brillig_keccak/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_keccak/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_keccak" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_loop/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_loop/Nargo.toml index 5a9ae5eabd7..c43a806784a 100644 --- a/crates/nargo_cli/tests/test_data/brillig_loop/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_loop/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_loop" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_modulo/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_modulo/Nargo.toml index 95aa9e7de29..b27417dba8f 100644 --- a/crates/nargo_cli/tests/test_data/brillig_modulo/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_modulo/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_modulo" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_nested_arrays/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_nested_arrays/Nargo.toml index d26a247aa98..4ce5518efb5 100644 --- a/crates/nargo_cli/tests/test_data/brillig_nested_arrays/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_nested_arrays/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_nested_arrays" +type = "bin" authors = [""] compiler_version = "0.6.0" diff --git a/crates/nargo_cli/tests/test_data/brillig_not/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_not/Nargo.toml index 1a714218b06..38a0872adfb 100644 --- a/crates/nargo_cli/tests/test_data/brillig_not/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_not/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_not" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_oracle/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_oracle/Nargo.toml index 647a37e0b9e..0b03be79ef8 100644 --- a/crates/nargo_cli/tests/test_data/brillig_oracle/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_oracle/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_oracle" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_pedersen/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_pedersen/Nargo.toml index f36c705654a..f6f34dcc650 100644 --- a/crates/nargo_cli/tests/test_data/brillig_pedersen/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_pedersen/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_pedersen" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_recursion/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_recursion/Nargo.toml index 60baa6b4d71..32dd1a6c858 100644 --- a/crates/nargo_cli/tests/test_data/brillig_recursion/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_recursion/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_recursion" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_references/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_references/Nargo.toml index a636a71aead..7f47fab9d9a 100644 --- a/crates/nargo_cli/tests/test_data/brillig_references/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_references/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_references" +type = "bin" authors = [""] compiler_version = "0.5.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_scalar_mul/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_scalar_mul/Nargo.toml index 50793a51e41..a580584f7f9 100644 --- a/crates/nargo_cli/tests/test_data/brillig_scalar_mul/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_scalar_mul/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_scalar_mul" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_schnorr/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_schnorr/Nargo.toml index 15f6ad5004e..3defa68f561 100644 --- a/crates/nargo_cli/tests/test_data/brillig_schnorr/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_schnorr/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_schnorr" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_sha256/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_sha256/Nargo.toml index 78fe4cf5c7b..6aebe1ed5ad 100644 --- a/crates/nargo_cli/tests/test_data/brillig_sha256/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_sha256/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_sha256" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_slices/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_slices/Nargo.toml index 3bf54c7d667..51d81efb6ae 100644 --- a/crates/nargo_cli/tests/test_data/brillig_slices/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_slices/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_slices" +type = "bin" authors = [""] compiler_version = "0.6.0" diff --git a/crates/nargo_cli/tests/test_data/brillig_to_be_bytes/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_to_be_bytes/Nargo.toml index dafefbfe266..21c5104e6a8 100644 --- a/crates/nargo_cli/tests/test_data/brillig_to_be_bytes/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_to_be_bytes/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_to_be_bytes" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_to_bits/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_to_bits/Nargo.toml index b6d1c94d830..6c62900468a 100644 --- a/crates/nargo_cli/tests/test_data/brillig_to_bits/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_to_bits/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_to_bits" +type = "bin" authors = [""] compiler_version = "0.7.0" diff --git a/crates/nargo_cli/tests/test_data/brillig_to_bytes_integration/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_to_bytes_integration/Nargo.toml index 75085d945c5..10c2abeee29 100644 --- a/crates/nargo_cli/tests/test_data/brillig_to_bytes_integration/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_to_bytes_integration/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_to_bytes_integration" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_to_le_bytes/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_to_le_bytes/Nargo.toml index 16954f119d5..e1ba633bff1 100644 --- a/crates/nargo_cli/tests/test_data/brillig_to_le_bytes/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_to_le_bytes/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_to_le_bytes" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/brillig_top_level/Nargo.toml b/crates/nargo_cli/tests/test_data/brillig_top_level/Nargo.toml index e1779a1d3b2..79686cab2ea 100644 --- a/crates/nargo_cli/tests/test_data/brillig_top_level/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/brillig_top_level/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "brillig_top_level" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/cast_bool/Nargo.toml b/crates/nargo_cli/tests/test_data/cast_bool/Nargo.toml index 0f7103580df..65a878d776a 100644 --- a/crates/nargo_cli/tests/test_data/cast_bool/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/cast_bool/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "cast_bool" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/closures_mut_ref/Nargo.toml b/crates/nargo_cli/tests/test_data/closures_mut_ref/Nargo.toml index c829bb160b1..f70cde6f878 100644 --- a/crates/nargo_cli/tests/test_data/closures_mut_ref/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/closures_mut_ref/Nargo.toml @@ -1,6 +1,7 @@ [package] name = "closures_mut_ref" +type = "bin" authors = [""] compiler_version = "0.8.0" -[dependencies] \ No newline at end of file +[dependencies] diff --git a/crates/nargo_cli/tests/test_data/comptime_array_access/Nargo.toml b/crates/nargo_cli/tests/test_data/comptime_array_access/Nargo.toml index c0f183dd74e..794702bbeaa 100644 --- a/crates/nargo_cli/tests/test_data/comptime_array_access/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/comptime_array_access/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "comptime_array_access" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/comptime_recursion_regression/Nargo.toml b/crates/nargo_cli/tests/test_data/comptime_recursion_regression/Nargo.toml index b0fa20dec39..6ded8f92d55 100644 --- a/crates/nargo_cli/tests/test_data/comptime_recursion_regression/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/comptime_recursion_regression/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "comptime_recursion_regression" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/config.toml b/crates/nargo_cli/tests/test_data/config.toml index 6fe6c7897e1..61178563154 100644 --- a/crates/nargo_cli/tests/test_data/config.toml +++ b/crates/nargo_cli/tests/test_data/config.toml @@ -2,4 +2,4 @@ exclude = [] # List of tests (as their directory name) expecting to fail: if the test pass, we report an error. -fail = ["brillig_assert_fail", "dep_impl_primitive", "workspace_fail", "workspace_missing_toml"] +fail = ["brillig_assert_fail", "dep_impl_primitive", "depend_on_bin", "workspace_fail", "workspace_missing_toml"] diff --git a/crates/nargo_cli/tests/test_data/constant_return/Nargo.toml b/crates/nargo_cli/tests/test_data/constant_return/Nargo.toml index 00772d41ef0..d74eea4d3a7 100644 --- a/crates/nargo_cli/tests/test_data/constant_return/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/constant_return/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "constant_return" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/contracts/Nargo.toml b/crates/nargo_cli/tests/test_data/contracts/Nargo.toml index 08f5ea12655..cca289aa4fd 100644 --- a/crates/nargo_cli/tests/test_data/contracts/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/contracts/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "contracts" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/debug_logs/Nargo.toml b/crates/nargo_cli/tests/test_data/debug_logs/Nargo.toml index 9c8a7404060..edc03c152cf 100644 --- a/crates/nargo_cli/tests/test_data/debug_logs/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/debug_logs/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "debug_logs" +type = "bin" authors = [""] compiler_version = "0.8.0" diff --git a/crates/nargo_cli/tests/test_data/dep_impl_primitive/Nargo.toml b/crates/nargo_cli/tests/test_data/dep_impl_primitive/Nargo.toml index 946d14cf275..6a49afec2c4 100644 --- a/crates/nargo_cli/tests/test_data/dep_impl_primitive/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/dep_impl_primitive/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "dep_impl_primitive" +type = "bin" authors = [""] compiler_version = "0.8.0" diff --git a/crates/nargo_cli/tests/test_data/depend_on_bin/Nargo.toml b/crates/nargo_cli/tests/test_data/depend_on_bin/Nargo.toml new file mode 100644 index 00000000000..2404e68e180 --- /dev/null +++ b/crates/nargo_cli/tests/test_data/depend_on_bin/Nargo.toml @@ -0,0 +1,8 @@ +[package] +name = "depend_on_bin" +type = "bin" +authors = [""] +compiler_version = "0.8.0" + +[dependencies] +bin_dep = { path = "../../test_libraries/bin_dep" } diff --git a/crates/nargo_cli/tests/test_data/depend_on_bin/Prover.toml b/crates/nargo_cli/tests/test_data/depend_on_bin/Prover.toml new file mode 100644 index 00000000000..7d4290a117a --- /dev/null +++ b/crates/nargo_cli/tests/test_data/depend_on_bin/Prover.toml @@ -0,0 +1 @@ +x = 1 diff --git a/crates/nargo_cli/tests/test_data/depend_on_bin/src/main.nr b/crates/nargo_cli/tests/test_data/depend_on_bin/src/main.nr new file mode 100644 index 00000000000..4e03e8eb41e --- /dev/null +++ b/crates/nargo_cli/tests/test_data/depend_on_bin/src/main.nr @@ -0,0 +1,5 @@ +use dep::bin_dep; + +fn main(x : Field) { + assert(x == 1); +} diff --git a/crates/nargo_cli/tests/test_data/diamond_deps_0/Nargo.toml b/crates/nargo_cli/tests/test_data/diamond_deps_0/Nargo.toml index ae9457e2286..6b1dd65ba32 100644 --- a/crates/nargo_cli/tests/test_data/diamond_deps_0/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/diamond_deps_0/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "diamond_deps_0" +type = "bin" authors = [""] compiler_version = "0.7.1" diff --git a/crates/nargo_cli/tests/test_data/distinct_keyword/Nargo.toml b/crates/nargo_cli/tests/test_data/distinct_keyword/Nargo.toml index e843cdfb74c..b7de54ea5cc 100644 --- a/crates/nargo_cli/tests/test_data/distinct_keyword/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/distinct_keyword/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "distinct_keyword" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/ec_baby_jubjub/Nargo.toml b/crates/nargo_cli/tests/test_data/ec_baby_jubjub/Nargo.toml index 41f8cb35a32..178be37f780 100644 --- a/crates/nargo_cli/tests/test_data/ec_baby_jubjub/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/ec_baby_jubjub/Nargo.toml @@ -1,6 +1,7 @@ [package] name = "ec_baby_jubjub" description = "Baby Jubjub sanity checks" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/ecdsa_secp256k1/Nargo.toml b/crates/nargo_cli/tests/test_data/ecdsa_secp256k1/Nargo.toml index 19d9a69f5e3..0f8111dc9f6 100644 --- a/crates/nargo_cli/tests/test_data/ecdsa_secp256k1/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/ecdsa_secp256k1/Nargo.toml @@ -1,6 +1,7 @@ [package] name = "ecdsa_secp256k1" description = "ECDSA secp256k1 verification" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/ecdsa_secp256r1/Nargo.toml b/crates/nargo_cli/tests/test_data/ecdsa_secp256r1/Nargo.toml index 7d45332ae49..738b049060a 100644 --- a/crates/nargo_cli/tests/test_data/ecdsa_secp256r1/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/ecdsa_secp256r1/Nargo.toml @@ -1,6 +1,7 @@ [package] name = "ecdsa_secp256r1" description = "ECDSA secp256r1 verification" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/generics/Nargo.toml b/crates/nargo_cli/tests/test_data/generics/Nargo.toml index 32fc2017336..18bdae1ab08 100644 --- a/crates/nargo_cli/tests/test_data/generics/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/generics/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "generics" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/global_consts/Nargo.toml b/crates/nargo_cli/tests/test_data/global_consts/Nargo.toml index 2338ec92e6b..2452ad8edb3 100644 --- a/crates/nargo_cli/tests/test_data/global_consts/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/global_consts/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "global_consts" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/hash_to_field/Nargo.toml b/crates/nargo_cli/tests/test_data/hash_to_field/Nargo.toml index 9e490846dc4..d78b59118f9 100644 --- a/crates/nargo_cli/tests/test_data/hash_to_field/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/hash_to_field/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "hash_to_field" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/higher_order_fn_selector/Nargo.toml b/crates/nargo_cli/tests/test_data/higher_order_fn_selector/Nargo.toml index 3c2277e35a5..09a0e342a71 100644 --- a/crates/nargo_cli/tests/test_data/higher_order_fn_selector/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/higher_order_fn_selector/Nargo.toml @@ -1,6 +1,7 @@ [package] name = "higher_order_fn_selector" +type = "bin" authors = [""] compiler_version = "0.8.0" -[dependencies] \ No newline at end of file +[dependencies] diff --git a/crates/nargo_cli/tests/test_data/higher_order_functions/Nargo.toml b/crates/nargo_cli/tests/test_data/higher_order_functions/Nargo.toml index cf7526abc7f..9dc419d1678 100644 --- a/crates/nargo_cli/tests/test_data/higher_order_functions/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/higher_order_functions/Nargo.toml @@ -1,6 +1,7 @@ [package] name = "higher_order_functions" +type = "bin" authors = [""] compiler_version = "0.1" -[dependencies] \ No newline at end of file +[dependencies] diff --git a/crates/nargo_cli/tests/test_data/if_else_chain/Nargo.toml b/crates/nargo_cli/tests/test_data/if_else_chain/Nargo.toml index e9b51315c84..fc5fffa2185 100644 --- a/crates/nargo_cli/tests/test_data/if_else_chain/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/if_else_chain/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "if_else_chain" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/inner_outer_cl/Nargo.toml b/crates/nargo_cli/tests/test_data/inner_outer_cl/Nargo.toml index 1470053df2f..25722866d9b 100644 --- a/crates/nargo_cli/tests/test_data/inner_outer_cl/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/inner_outer_cl/Nargo.toml @@ -1,6 +1,7 @@ [package] name = "inner_outer_cl" +type = "bin" authors = [""] compiler_version = "0.7.1" -[dependencies] \ No newline at end of file +[dependencies] diff --git a/crates/nargo_cli/tests/test_data/integer_array_indexing/Nargo.toml b/crates/nargo_cli/tests/test_data/integer_array_indexing/Nargo.toml index 23dd9997c90..3cec63d465b 100644 --- a/crates/nargo_cli/tests/test_data/integer_array_indexing/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/integer_array_indexing/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "integer_array_indexing" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/keccak256/Nargo.toml b/crates/nargo_cli/tests/test_data/keccak256/Nargo.toml index 6e2db010876..ab1a04b7c07 100644 --- a/crates/nargo_cli/tests/test_data/keccak256/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/keccak256/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "keccak256" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/let_stmt/Nargo.toml b/crates/nargo_cli/tests/test_data/let_stmt/Nargo.toml index 448e473f2ed..45f9a53edeb 100644 --- a/crates/nargo_cli/tests/test_data/let_stmt/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/let_stmt/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "let_stmt" +type = "bin" authors = [""] compiler_version = "0.8.0" diff --git a/crates/nargo_cli/tests/test_data/main_bool_arg/Nargo.toml b/crates/nargo_cli/tests/test_data/main_bool_arg/Nargo.toml index b80dc750c15..1a4e3657464 100644 --- a/crates/nargo_cli/tests/test_data/main_bool_arg/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/main_bool_arg/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "main_bool_arg" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/main_return/Nargo.toml b/crates/nargo_cli/tests/test_data/main_return/Nargo.toml index c5df18dc4ad..c4224b7e23c 100644 --- a/crates/nargo_cli/tests/test_data/main_return/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/main_return/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "main_return" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/merkle_insert/Nargo.toml b/crates/nargo_cli/tests/test_data/merkle_insert/Nargo.toml index b1a7456b26e..3eb97c30cac 100644 --- a/crates/nargo_cli/tests/test_data/merkle_insert/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/merkle_insert/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "merkle_insert" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/modules/Nargo.toml b/crates/nargo_cli/tests/test_data/modules/Nargo.toml index eaa0a3a1b4b..b4f9b469ea8 100644 --- a/crates/nargo_cli/tests/test_data/modules/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/modules/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "modules" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/modules_more/Nargo.toml b/crates/nargo_cli/tests/test_data/modules_more/Nargo.toml index cc60838dbb0..5acf61a71a7 100644 --- a/crates/nargo_cli/tests/test_data/modules_more/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/modules_more/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "modules_more" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/modulus/Nargo.toml b/crates/nargo_cli/tests/test_data/modulus/Nargo.toml index 895b2af6ac0..5a1309a2a9d 100644 --- a/crates/nargo_cli/tests/test_data/modulus/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/modulus/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "modulus" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/nested_arrays_from_brillig/Nargo.toml b/crates/nargo_cli/tests/test_data/nested_arrays_from_brillig/Nargo.toml index 01273040d31..bd5dfb8bef4 100644 --- a/crates/nargo_cli/tests/test_data/nested_arrays_from_brillig/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/nested_arrays_from_brillig/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "nested_arrays_from_brillig" +type = "bin" authors = [""] compiler_version = "0.6.0" diff --git a/crates/nargo_cli/tests/test_data/numeric_generics/Nargo.toml b/crates/nargo_cli/tests/test_data/numeric_generics/Nargo.toml index 199ec161f74..c8a3ce73a5e 100644 --- a/crates/nargo_cli/tests/test_data/numeric_generics/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/numeric_generics/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "numeric_generics" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/option/Nargo.toml b/crates/nargo_cli/tests/test_data/option/Nargo.toml index 2248e9c06dd..553efccd746 100644 --- a/crates/nargo_cli/tests/test_data/option/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/option/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "option" +type = "bin" authors = [""] compiler_version = "0.7.0" diff --git a/crates/nargo_cli/tests/test_data/pedersen_check/Nargo.toml b/crates/nargo_cli/tests/test_data/pedersen_check/Nargo.toml index c4fbf2407a7..3fc0bd9b79e 100644 --- a/crates/nargo_cli/tests/test_data/pedersen_check/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/pedersen_check/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "pedersen_check" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/poseidon_bn254_hash/Nargo.toml b/crates/nargo_cli/tests/test_data/poseidon_bn254_hash/Nargo.toml index 49f60c86aee..d23bb7cb919 100644 --- a/crates/nargo_cli/tests/test_data/poseidon_bn254_hash/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/poseidon_bn254_hash/Nargo.toml @@ -1,6 +1,7 @@ [package] name = "poseidon_bn254_hash" description = "Poseidon 254-bit permutation test on 3 elements with alpha = 5" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/poseidonsponge_x5_254/Nargo.toml b/crates/nargo_cli/tests/test_data/poseidonsponge_x5_254/Nargo.toml index 4577f31236c..df1da360206 100644 --- a/crates/nargo_cli/tests/test_data/poseidonsponge_x5_254/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/poseidonsponge_x5_254/Nargo.toml @@ -1,6 +1,7 @@ [package] name = "poseidonsponge_x5_254" description = "Variable-length Poseidon-128 sponge test on 7 elements with alpha = 5" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/pred_eq/Nargo.toml b/crates/nargo_cli/tests/test_data/pred_eq/Nargo.toml index ffa0d440f4a..ee6f7a28e0f 100644 --- a/crates/nargo_cli/tests/test_data/pred_eq/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/pred_eq/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "pred_eq" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/references/Nargo.toml b/crates/nargo_cli/tests/test_data/references/Nargo.toml index 83fc1fd3811..b52fdcf77f0 100644 --- a/crates/nargo_cli/tests/test_data/references/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/references/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "references" +type = "bin" authors = [""] compiler_version = "0.5.1" diff --git a/crates/nargo_cli/tests/test_data/regression/Nargo.toml b/crates/nargo_cli/tests/test_data/regression/Nargo.toml index 0f60b2c20ee..91497e10342 100644 --- a/crates/nargo_cli/tests/test_data/regression/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/regression/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "regression" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/regression_2099/Nargo.toml b/crates/nargo_cli/tests/test_data/regression_2099/Nargo.toml index ca96e7164a5..3e995a0acd6 100644 --- a/crates/nargo_cli/tests/test_data/regression_2099/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/regression_2099/Nargo.toml @@ -1,6 +1,7 @@ [package] name = "regression_2099" +type = "bin" authors = [""] compiler_version = "0.9.0" -[dependencies] \ No newline at end of file +[dependencies] diff --git a/crates/nargo_cli/tests/test_data/regression_method_cannot_be_found/Nargo.toml b/crates/nargo_cli/tests/test_data/regression_method_cannot_be_found/Nargo.toml index fc1dc4d4ce2..9d9bb35778d 100644 --- a/crates/nargo_cli/tests/test_data/regression_method_cannot_be_found/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/regression_method_cannot_be_found/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "regression_method_cannot_be_found" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/ret_fn_ret_cl/Nargo.toml b/crates/nargo_cli/tests/test_data/ret_fn_ret_cl/Nargo.toml index 3e411b2849b..4e1b06d927f 100644 --- a/crates/nargo_cli/tests/test_data/ret_fn_ret_cl/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/ret_fn_ret_cl/Nargo.toml @@ -1,6 +1,7 @@ [package] name = "ret_fn_ret_cl" +type = "bin" authors = [""] compiler_version = "0.7.1" -[dependencies] \ No newline at end of file +[dependencies] diff --git a/crates/nargo_cli/tests/test_data/scalar_mul/Nargo.toml b/crates/nargo_cli/tests/test_data/scalar_mul/Nargo.toml index eb1abb258ed..55bf6395b34 100644 --- a/crates/nargo_cli/tests/test_data/scalar_mul/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/scalar_mul/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "scalar_mul" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/schnorr/Nargo.toml b/crates/nargo_cli/tests/test_data/schnorr/Nargo.toml index f6f45f983f5..3ba59b7010e 100644 --- a/crates/nargo_cli/tests/test_data/schnorr/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/schnorr/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "schnorr" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/sha256/Nargo.toml b/crates/nargo_cli/tests/test_data/sha256/Nargo.toml index d29e88bc237..97ca07f03d4 100644 --- a/crates/nargo_cli/tests/test_data/sha256/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/sha256/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "sha256" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/sha2_blocks/Nargo.toml b/crates/nargo_cli/tests/test_data/sha2_blocks/Nargo.toml index 5ba3d3dc6db..9aa46c465e9 100644 --- a/crates/nargo_cli/tests/test_data/sha2_blocks/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/sha2_blocks/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "sha2_blocks" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/sha2_byte/Nargo.toml b/crates/nargo_cli/tests/test_data/sha2_byte/Nargo.toml index 8759ff064f3..849b6220db7 100644 --- a/crates/nargo_cli/tests/test_data/sha2_byte/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/sha2_byte/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "sha2_byte" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/signed_division/Nargo.toml b/crates/nargo_cli/tests/test_data/signed_division/Nargo.toml index b4ec731ad08..c1dacecae02 100644 --- a/crates/nargo_cli/tests/test_data/signed_division/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/signed_division/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "signed_division" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/simple_add_and_ret_arr/Nargo.toml b/crates/nargo_cli/tests/test_data/simple_add_and_ret_arr/Nargo.toml index 67826a05fea..9afb8c5fd5b 100644 --- a/crates/nargo_cli/tests/test_data/simple_add_and_ret_arr/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/simple_add_and_ret_arr/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "simple_add_and_ret_arr" +type = "bin" authors = [""] compiler_version = "0.6.0" diff --git a/crates/nargo_cli/tests/test_data/simple_array_param/Nargo.toml b/crates/nargo_cli/tests/test_data/simple_array_param/Nargo.toml index f92a75d2cb8..9874c8cb6a8 100644 --- a/crates/nargo_cli/tests/test_data/simple_array_param/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/simple_array_param/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "simple_array_param" +type = "bin" authors = [""] compiler_version = "0.6.0" diff --git a/crates/nargo_cli/tests/test_data/simple_bitwise/Nargo.toml b/crates/nargo_cli/tests/test_data/simple_bitwise/Nargo.toml index 12f2b6989ec..c8fe1e06b4c 100644 --- a/crates/nargo_cli/tests/test_data/simple_bitwise/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/simple_bitwise/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "simple_bitwise" +type = "bin" authors = [""] compiler_version = "0.6.0" diff --git a/crates/nargo_cli/tests/test_data/simple_comparison/Nargo.toml b/crates/nargo_cli/tests/test_data/simple_comparison/Nargo.toml index 0af7070d974..840eb0a7e0b 100644 --- a/crates/nargo_cli/tests/test_data/simple_comparison/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/simple_comparison/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "simple_comparison" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/simple_mut/Nargo.toml b/crates/nargo_cli/tests/test_data/simple_mut/Nargo.toml index 2d92d708f8d..b7b5c5d3dcc 100644 --- a/crates/nargo_cli/tests/test_data/simple_mut/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/simple_mut/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "simple_mut" +type = "bin" authors = [""] compiler_version = "0.6.0" diff --git a/crates/nargo_cli/tests/test_data/simple_not/Nargo.toml b/crates/nargo_cli/tests/test_data/simple_not/Nargo.toml index d64ccb54191..0ca112cf4b3 100644 --- a/crates/nargo_cli/tests/test_data/simple_not/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/simple_not/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "simple_not" +type = "bin" authors = [""] compiler_version = "0.6.0" diff --git a/crates/nargo_cli/tests/test_data/simple_print/Nargo.toml b/crates/nargo_cli/tests/test_data/simple_print/Nargo.toml index 85429d3a080..d154fbc47f2 100644 --- a/crates/nargo_cli/tests/test_data/simple_print/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/simple_print/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "simple_print" +type = "bin" authors = [""] compiler_version = "0.6.0" diff --git a/crates/nargo_cli/tests/test_data/simple_program_addition/Nargo.toml b/crates/nargo_cli/tests/test_data/simple_program_addition/Nargo.toml index 98fbb603178..8cf28eb45a7 100644 --- a/crates/nargo_cli/tests/test_data/simple_program_addition/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/simple_program_addition/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "simple_program_addition" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/simple_program_no_body/Nargo.toml b/crates/nargo_cli/tests/test_data/simple_program_no_body/Nargo.toml index 4c0150d0472..f35a196ab59 100644 --- a/crates/nargo_cli/tests/test_data/simple_program_no_body/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/simple_program_no_body/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "simple_program_no_body" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/simple_radix/Nargo.toml b/crates/nargo_cli/tests/test_data/simple_radix/Nargo.toml index 85eb02f85b9..6c208c1645c 100644 --- a/crates/nargo_cli/tests/test_data/simple_radix/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/simple_radix/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "simple_radix" +type = "bin" authors = [""] compiler_version = "0.6.0" diff --git a/crates/nargo_cli/tests/test_data/simple_range/Nargo.toml b/crates/nargo_cli/tests/test_data/simple_range/Nargo.toml index dafaddbb146..864cd03beb3 100644 --- a/crates/nargo_cli/tests/test_data/simple_range/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/simple_range/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "simple_range" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/simple_shield/Nargo.toml b/crates/nargo_cli/tests/test_data/simple_shield/Nargo.toml index 8b22da7ef10..b710f38d826 100644 --- a/crates/nargo_cli/tests/test_data/simple_shield/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/simple_shield/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "simple_shield" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/simple_shift_left_right/Nargo.toml b/crates/nargo_cli/tests/test_data/simple_shift_left_right/Nargo.toml index 7d1e4cf39c0..09eb46d547e 100644 --- a/crates/nargo_cli/tests/test_data/simple_shift_left_right/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/simple_shift_left_right/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "simple_shift_left_right" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/slices/Nargo.toml b/crates/nargo_cli/tests/test_data/slices/Nargo.toml index 0b6a804ea1d..bc9dcc7729a 100644 --- a/crates/nargo_cli/tests/test_data/slices/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/slices/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "slices" +type = "bin" authors = [""] compiler_version = "0.6.0" diff --git a/crates/nargo_cli/tests/test_data/strings/Nargo.toml b/crates/nargo_cli/tests/test_data/strings/Nargo.toml index 9b29990eb35..30df1a2f27e 100644 --- a/crates/nargo_cli/tests/test_data/strings/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/strings/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "strings" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/struct/Nargo.toml b/crates/nargo_cli/tests/test_data/struct/Nargo.toml index 949d3e860b3..34c3d838538 100644 --- a/crates/nargo_cli/tests/test_data/struct/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/struct/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "struct" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/struct_array_inputs/Nargo.toml b/crates/nargo_cli/tests/test_data/struct_array_inputs/Nargo.toml index 040b5359f33..7be5ccbb99f 100644 --- a/crates/nargo_cli/tests/test_data/struct_array_inputs/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/struct_array_inputs/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "struct_array_inputs" +type = "bin" authors = [""] compiler_version = "0.6.0" diff --git a/crates/nargo_cli/tests/test_data/struct_fields_ordering/Nargo.toml b/crates/nargo_cli/tests/test_data/struct_fields_ordering/Nargo.toml index 5d2e0d8d9d1..2e886f62689 100644 --- a/crates/nargo_cli/tests/test_data/struct_fields_ordering/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/struct_fields_ordering/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "struct_fields_ordering" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/struct_inputs/Nargo.toml b/crates/nargo_cli/tests/test_data/struct_inputs/Nargo.toml index ee51fec2bcd..455a7b28ddb 100644 --- a/crates/nargo_cli/tests/test_data/struct_inputs/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/struct_inputs/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "struct_inputs" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/submodules/Nargo.toml b/crates/nargo_cli/tests/test_data/submodules/Nargo.toml index f38965dfa11..a98eda3cd89 100644 --- a/crates/nargo_cli/tests/test_data/submodules/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/submodules/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "submodules" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/to_be_bytes/Nargo.toml b/crates/nargo_cli/tests/test_data/to_be_bytes/Nargo.toml index 7c9cbc964c1..c0837a335f8 100644 --- a/crates/nargo_cli/tests/test_data/to_be_bytes/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/to_be_bytes/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "to_be_bytes" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/to_bits/Nargo.toml b/crates/nargo_cli/tests/test_data/to_bits/Nargo.toml index 3cd694dac88..9fe822eca93 100644 --- a/crates/nargo_cli/tests/test_data/to_bits/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/to_bits/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "to_bits" +type = "bin" authors = [""] compiler_version = "0.7.0" diff --git a/crates/nargo_cli/tests/test_data/to_bytes_integration/Nargo.toml b/crates/nargo_cli/tests/test_data/to_bytes_integration/Nargo.toml index 40da1e922ae..fd1c714b123 100644 --- a/crates/nargo_cli/tests/test_data/to_bytes_integration/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/to_bytes_integration/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "to_bytes_integration" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/to_le_bytes/Nargo.toml b/crates/nargo_cli/tests/test_data/to_le_bytes/Nargo.toml index 1ad2aac253d..34cf8a5afc7 100644 --- a/crates/nargo_cli/tests/test_data/to_le_bytes/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/to_le_bytes/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "to_le_bytes" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/tuples/Nargo.toml b/crates/nargo_cli/tests/test_data/tuples/Nargo.toml index 1377570c1a4..54603e9a96b 100644 --- a/crates/nargo_cli/tests/test_data/tuples/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/tuples/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "tuples" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/type_aliases/Nargo.toml b/crates/nargo_cli/tests/test_data/type_aliases/Nargo.toml index a797cb0bbe2..e828f6913e0 100644 --- a/crates/nargo_cli/tests/test_data/type_aliases/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/type_aliases/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "type_aliases" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/unconstrained_empty/Nargo.toml b/crates/nargo_cli/tests/test_data/unconstrained_empty/Nargo.toml index 63689725523..a42660e8bb7 100644 --- a/crates/nargo_cli/tests/test_data/unconstrained_empty/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/unconstrained_empty/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "unconstrained_empty" +type = "bin" authors = [""] compiler_version = "0.6.0" diff --git a/crates/nargo_cli/tests/test_data/unit/Nargo.toml b/crates/nargo_cli/tests/test_data/unit/Nargo.toml index 433e130173e..35fcd4bf339 100644 --- a/crates/nargo_cli/tests/test_data/unit/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/unit/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "unit" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_data/vectors/Nargo.toml b/crates/nargo_cli/tests/test_data/vectors/Nargo.toml index 7f768c1fd23..f628d5e27e1 100644 --- a/crates/nargo_cli/tests/test_data/vectors/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/vectors/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "vectors" +type = "bin" authors = [""] compiler_version = "0.7.1" diff --git a/crates/nargo_cli/tests/test_data/workspace/crates/a/Nargo.toml b/crates/nargo_cli/tests/test_data/workspace/crates/a/Nargo.toml index 5ff1a743e3d..411f048a93b 100644 --- a/crates/nargo_cli/tests/test_data/workspace/crates/a/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/workspace/crates/a/Nargo.toml @@ -1,6 +1,7 @@ [package] name = "a" +type = "bin" authors = [""] compiler_version = "0.8.0" -[dependencies] \ No newline at end of file +[dependencies] diff --git a/crates/nargo_cli/tests/test_data/workspace/crates/b/Nargo.toml b/crates/nargo_cli/tests/test_data/workspace/crates/b/Nargo.toml index 8ae69a781eb..1af8ef961cc 100644 --- a/crates/nargo_cli/tests/test_data/workspace/crates/b/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/workspace/crates/b/Nargo.toml @@ -1,6 +1,7 @@ [package] name = "b" +type = "bin" authors = [""] compiler_version = "0.8.0" -[dependencies] \ No newline at end of file +[dependencies] diff --git a/crates/nargo_cli/tests/test_data/workspace_default_member/a/Nargo.toml b/crates/nargo_cli/tests/test_data/workspace_default_member/a/Nargo.toml index 5ff1a743e3d..411f048a93b 100644 --- a/crates/nargo_cli/tests/test_data/workspace_default_member/a/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/workspace_default_member/a/Nargo.toml @@ -1,6 +1,7 @@ [package] name = "a" +type = "bin" authors = [""] compiler_version = "0.8.0" -[dependencies] \ No newline at end of file +[dependencies] diff --git a/crates/nargo_cli/tests/test_data/workspace_default_member/b/Nargo.toml b/crates/nargo_cli/tests/test_data/workspace_default_member/b/Nargo.toml index 85c6119c62c..1af8ef961cc 100644 --- a/crates/nargo_cli/tests/test_data/workspace_default_member/b/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/workspace_default_member/b/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "b" +type = "bin" authors = [""] compiler_version = "0.8.0" diff --git a/crates/nargo_cli/tests/test_data/workspace_fail/crates/a/Nargo.toml b/crates/nargo_cli/tests/test_data/workspace_fail/crates/a/Nargo.toml index 5ff1a743e3d..411f048a93b 100644 --- a/crates/nargo_cli/tests/test_data/workspace_fail/crates/a/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/workspace_fail/crates/a/Nargo.toml @@ -1,6 +1,7 @@ [package] name = "a" +type = "bin" authors = [""] compiler_version = "0.8.0" -[dependencies] \ No newline at end of file +[dependencies] diff --git a/crates/nargo_cli/tests/test_data/workspace_fail/crates/b/Nargo.toml b/crates/nargo_cli/tests/test_data/workspace_fail/crates/b/Nargo.toml index 8ae69a781eb..1af8ef961cc 100644 --- a/crates/nargo_cli/tests/test_data/workspace_fail/crates/b/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/workspace_fail/crates/b/Nargo.toml @@ -1,6 +1,7 @@ [package] name = "b" +type = "bin" authors = [""] compiler_version = "0.8.0" -[dependencies] \ No newline at end of file +[dependencies] diff --git a/crates/nargo_cli/tests/test_data/workspace_missing_toml/crates/b/Nargo.toml b/crates/nargo_cli/tests/test_data/workspace_missing_toml/crates/b/Nargo.toml index 8ae69a781eb..1af8ef961cc 100644 --- a/crates/nargo_cli/tests/test_data/workspace_missing_toml/crates/b/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/workspace_missing_toml/crates/b/Nargo.toml @@ -1,6 +1,7 @@ [package] name = "b" +type = "bin" authors = [""] compiler_version = "0.8.0" -[dependencies] \ No newline at end of file +[dependencies] diff --git a/crates/nargo_cli/tests/test_data/xor/Nargo.toml b/crates/nargo_cli/tests/test_data/xor/Nargo.toml index b1bc5f3a4dd..ea15f5eb6c5 100644 --- a/crates/nargo_cli/tests/test_data/xor/Nargo.toml +++ b/crates/nargo_cli/tests/test_data/xor/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "xor" +type = "bin" authors = [""] compiler_version = "0.1" diff --git a/crates/nargo_cli/tests/test_libraries/bad_impl/Nargo.toml b/crates/nargo_cli/tests/test_libraries/bad_impl/Nargo.toml index 8e64e10fc64..ccb03576323 100644 --- a/crates/nargo_cli/tests/test_libraries/bad_impl/Nargo.toml +++ b/crates/nargo_cli/tests/test_libraries/bad_impl/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "bad_impl" +type = "lib" authors = [""] compiler_version = "0.7.1" diff --git a/crates/nargo_cli/tests/test_libraries/bin_dep/Nargo.toml b/crates/nargo_cli/tests/test_libraries/bin_dep/Nargo.toml new file mode 100644 index 00000000000..aa7125bf5b5 --- /dev/null +++ b/crates/nargo_cli/tests/test_libraries/bin_dep/Nargo.toml @@ -0,0 +1,7 @@ +[package] +name = "bin_dep" +type = "bin" +authors = [""] +compiler_version = "0.7.1" + +[dependencies] diff --git a/crates/nargo_cli/tests/test_libraries/bin_dep/src/main.nr b/crates/nargo_cli/tests/test_libraries/bin_dep/src/main.nr new file mode 100644 index 00000000000..882a9c70056 --- /dev/null +++ b/crates/nargo_cli/tests/test_libraries/bin_dep/src/main.nr @@ -0,0 +1,4 @@ + +fn call_dep1_then_dep2(x : Field, y : Field) { + assert(x == y); +} diff --git a/crates/nargo_cli/tests/test_libraries/diamond_deps_1/Nargo.toml b/crates/nargo_cli/tests/test_libraries/diamond_deps_1/Nargo.toml index 7e8927d3907..7069390334c 100644 --- a/crates/nargo_cli/tests/test_libraries/diamond_deps_1/Nargo.toml +++ b/crates/nargo_cli/tests/test_libraries/diamond_deps_1/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "diamond_deps_1" +type = "lib" authors = [""] compiler_version = "0.7.1" diff --git a/crates/nargo_cli/tests/test_libraries/diamond_deps_2/Nargo.toml b/crates/nargo_cli/tests/test_libraries/diamond_deps_2/Nargo.toml index 7b5fd01b8d6..4b8ece297d3 100644 --- a/crates/nargo_cli/tests/test_libraries/diamond_deps_2/Nargo.toml +++ b/crates/nargo_cli/tests/test_libraries/diamond_deps_2/Nargo.toml @@ -1,5 +1,6 @@ [package] name = "diamond_deps_2" +type = "lib" authors = [""] compiler_version = "0.7.1" diff --git a/crates/noirc_driver/src/lib.rs b/crates/noirc_driver/src/lib.rs index c624dda2fce..6b9ab2c996d 100644 --- a/crates/noirc_driver/src/lib.rs +++ b/crates/noirc_driver/src/lib.rs @@ -8,7 +8,7 @@ use fm::FileId; use noirc_abi::FunctionSignature; use noirc_errors::{CustomDiagnostic, FileDiagnostic}; use noirc_evaluator::create_circuit; -use noirc_frontend::graph::{CrateId, CrateName, CrateType}; +use noirc_frontend::graph::{CrateId, CrateName}; use noirc_frontend::hir::def_map::{Contract, CrateDefMap}; use noirc_frontend::hir::Context; use noirc_frontend::monomorphization::monomorphize; @@ -52,15 +52,15 @@ pub fn compile_file( context: &mut Context, root_file: &Path, ) -> Result<(CompiledProgram, Warnings), ErrorsAndWarnings> { - let crate_id = prepare_crate(context, root_file, CrateType::Binary); + let crate_id = prepare_crate(context, root_file); compile_main(context, crate_id, &CompileOptions::default()) } /// Adds the file from the file system at `Path` to the crate graph -pub fn prepare_crate(context: &mut Context, file_name: &Path, crate_type: CrateType) -> CrateId { +pub fn prepare_crate(context: &mut Context, file_name: &Path) -> CrateId { let root_file_id = context.file_manager.add_file(file_name).unwrap(); - context.crate_graph.add_crate_root(crate_type, root_file_id) + context.crate_graph.add_crate_root(root_file_id) } /// Adds a edge in the crate graph for two crates @@ -70,11 +70,6 @@ pub fn add_dep( depends_on: CrateId, crate_name: CrateName, ) { - // Cannot depend on a binary - if context.crate_graph.crate_type(depends_on) == CrateType::Binary { - panic!("crates cannot depend on binaries. {crate_name:?} is a binary crate") - } - context .crate_graph .add_dep(this_crate, crate_name, depends_on) @@ -117,7 +112,7 @@ pub fn check_crate( // You can add any crate type to the crate graph // but you cannot depend on Binaries - let std_crate = context.crate_graph.add_stdlib(CrateType::Library, root_file_id); + let std_crate = context.crate_graph.add_stdlib(root_file_id); propagate_dep(context, std_crate, &std_crate_name.parse().unwrap()); let mut errors = vec![]; @@ -155,10 +150,13 @@ pub fn compile_main( let main = match context.get_main_function(&crate_id) { Some(m) => m, None => { + // TODO(#2155): This error might be a better to exist in Nargo let err = FileDiagnostic { - file_id: FileId::default(), - diagnostic: CustomDiagnostic::from_message("cannot compile crate into a program as the local crate is not a binary. For libraries, please use the check command") - }; + file_id: FileId::default(), + diagnostic: CustomDiagnostic::from_message( + "cannot compile crate into a program as it does not contain a `main` function", + ), + }; return Err(vec![err]); } }; diff --git a/crates/noirc_frontend/src/graph/mod.rs b/crates/noirc_frontend/src/graph/mod.rs index af9216071e6..2c251432e9b 100644 --- a/crates/noirc_frontend/src/graph/mod.rs +++ b/crates/noirc_frontend/src/graph/mod.rs @@ -73,16 +73,9 @@ pub struct CrateGraph { /// and we do not want names that differ by a hyphen pub const CHARACTER_BLACK_LIST: [char; 1] = ['-']; -#[derive(Debug, Copy, Clone, PartialEq, Eq)] -pub enum CrateType { - Library, - Binary, -} - #[derive(Debug, Clone, PartialEq, Eq)] pub struct CrateData { pub root_file_id: FileId, - pub crate_type: CrateType, pub dependencies: Vec, } @@ -101,7 +94,7 @@ impl Dependency { } impl CrateGraph { - pub fn add_crate_root(&mut self, crate_type: CrateType, file_id: FileId) -> CrateId { + pub fn add_crate_root(&mut self, file_id: FileId) -> CrateId { let mut roots_with_file_id = self.arena.iter().filter(|(_, crate_data)| crate_data.root_file_id == file_id); @@ -110,14 +103,14 @@ impl CrateGraph { return *file_id.0; } - let data = CrateData { root_file_id: file_id, crate_type, dependencies: Vec::new() }; + let data = CrateData { root_file_id: file_id, dependencies: Vec::new() }; let crate_id = CrateId::Crate(self.arena.len()); let prev = self.arena.insert(crate_id, data); assert!(prev.is_none()); crate_id } - pub fn add_stdlib(&mut self, crate_type: CrateType, file_id: FileId) -> CrateId { + pub fn add_stdlib(&mut self, file_id: FileId) -> CrateId { let mut roots_with_file_id = self.arena.iter().filter(|(_, crate_data)| crate_data.root_file_id == file_id); @@ -126,17 +119,13 @@ impl CrateGraph { return *file_id.0; } - let data = CrateData { root_file_id: file_id, crate_type, dependencies: Vec::new() }; + let data = CrateData { root_file_id: file_id, dependencies: Vec::new() }; let crate_id = CrateId::Stdlib(self.arena.len()); let prev = self.arena.insert(crate_id, data); assert!(prev.is_none()); crate_id } - pub fn crate_type(&self, crate_id: CrateId) -> CrateType { - self.arena.get(&crate_id).unwrap().crate_type - } - pub fn iter_keys(&self) -> impl Iterator + '_ { self.arena.keys().copied() } @@ -228,7 +217,7 @@ pub struct CyclicDependenciesError { mod tests { use std::path::PathBuf; - use super::{CrateGraph, CrateType, FileId}; + use super::{CrateGraph, FileId}; fn dummy_file_ids(n: usize) -> Vec { use fm::{FileMap, FILE_EXTENSION}; @@ -250,9 +239,9 @@ mod tests { let file_ids = dummy_file_ids(3); let mut graph = CrateGraph::default(); - let crate1 = graph.add_crate_root(CrateType::Library, file_ids[0]); - let crate2 = graph.add_crate_root(CrateType::Library, file_ids[1]); - let crate3 = graph.add_crate_root(CrateType::Library, file_ids[2]); + let crate1 = graph.add_crate_root(file_ids[0]); + let crate2 = graph.add_crate_root(file_ids[1]); + let crate3 = graph.add_crate_root(file_ids[2]); assert!(graph.add_dep(crate1, "crate2".parse().unwrap(), crate2).is_ok()); assert!(graph.add_dep(crate2, "crate3".parse().unwrap(), crate3).is_ok()); @@ -266,9 +255,9 @@ mod tests { let file_id_1 = file_ids[1]; let file_id_2 = file_ids[2]; let mut graph = CrateGraph::default(); - let crate1 = graph.add_crate_root(CrateType::Library, file_id_0); - let crate2 = graph.add_crate_root(CrateType::Library, file_id_1); - let crate3 = graph.add_crate_root(CrateType::Library, file_id_2); + let crate1 = graph.add_crate_root(file_id_0); + let crate2 = graph.add_crate_root(file_id_1); + let crate3 = graph.add_crate_root(file_id_2); assert!(graph.add_dep(crate1, "crate2".parse().unwrap(), crate2).is_ok()); assert!(graph.add_dep(crate2, "crate3".parse().unwrap(), crate3).is_ok()); } @@ -279,12 +268,12 @@ mod tests { let file_id_1 = file_ids[1]; let file_id_2 = file_ids[2]; let mut graph = CrateGraph::default(); - let _crate1 = graph.add_crate_root(CrateType::Library, file_id_0); - let _crate2 = graph.add_crate_root(CrateType::Library, file_id_1); + let _crate1 = graph.add_crate_root(file_id_0); + let _crate2 = graph.add_crate_root(file_id_1); // Adding the same file, so the crate should be the same. - let crate3 = graph.add_crate_root(CrateType::Library, file_id_2); - let crate3_2 = graph.add_crate_root(CrateType::Library, file_id_2); + let crate3 = graph.add_crate_root(file_id_2); + let crate3_2 = graph.add_crate_root(file_id_2); assert_eq!(crate3, crate3_2); } } diff --git a/crates/noirc_frontend/src/hir/mod.rs b/crates/noirc_frontend/src/hir/mod.rs index d6f98e112af..91a6006d096 100644 --- a/crates/noirc_frontend/src/hir/mod.rs +++ b/crates/noirc_frontend/src/hir/mod.rs @@ -4,7 +4,7 @@ pub mod resolution; pub mod scope; pub mod type_check; -use crate::graph::{CrateGraph, CrateId, CrateType}; +use crate::graph::{CrateGraph, CrateId}; use crate::hir_def::function::FuncMeta; use crate::node_interner::{FuncId, NodeInterner}; use def_map::{Contract, CrateDefMap}; @@ -67,14 +67,7 @@ impl Context { // Find the local crate, one should always be present let local_crate = self.def_map(crate_id).unwrap(); - // Check the crate type - // We don't panic here to allow users to `evaluate` libraries which will do nothing - if matches!(self.crate_graph[*crate_id].crate_type, CrateType::Binary) { - // All Binaries should have a main function - local_crate.main_function() - } else { - None - } + local_crate.main_function() } /// Returns a list of all functions in the current crate marked with #[test] diff --git a/crates/wasm/src/compile.rs b/crates/wasm/src/compile.rs index 4254110b849..2e923574bbf 100644 --- a/crates/wasm/src/compile.rs +++ b/crates/wasm/src/compile.rs @@ -6,10 +6,7 @@ use noirc_driver::{ check_crate, compile_contracts, compile_no_check, prepare_crate, propagate_dep, CompileOptions, CompiledContract, }; -use noirc_frontend::{ - graph::{CrateGraph, CrateType}, - hir::Context, -}; +use noirc_frontend::{graph::CrateGraph, hir::Context}; use serde::{Deserialize, Serialize}; use std::path::Path; use wasm_bindgen::prelude::*; @@ -63,7 +60,7 @@ impl Default for WASMCompileOptions { fn add_noir_lib(context: &mut Context, crate_name: &str) { let path_to_lib = Path::new(&crate_name).join("lib.nr"); - let library_crate = prepare_crate(context, &path_to_lib, CrateType::Library); + let library_crate = prepare_crate(context, &path_to_lib); propagate_dep(context, library_crate, &crate_name.parse().unwrap()); } @@ -87,7 +84,7 @@ pub fn compile(args: JsValue) -> JsValue { let mut context = Context::new(fm, graph); let path = Path::new(&options.entry_point); - let crate_id = prepare_crate(&mut context, path, CrateType::Binary); + let crate_id = prepare_crate(&mut context, path); for dependency in options.optional_dependencies_set { add_noir_lib(&mut context, dependency.as_str()); From afc473db4cf4538c7760ed0cc02f60358f4da1aa Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Fri, 4 Aug 2023 18:42:43 +0100 Subject: [PATCH 06/18] chore: add documentation to the `nargo lsp` command (#2169) --- crates/nargo_cli/src/cli/lsp_cmd.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/nargo_cli/src/cli/lsp_cmd.rs b/crates/nargo_cli/src/cli/lsp_cmd.rs index 1a1028e2713..789ba6fe88d 100644 --- a/crates/nargo_cli/src/cli/lsp_cmd.rs +++ b/crates/nargo_cli/src/cli/lsp_cmd.rs @@ -11,6 +11,11 @@ use tower::ServiceBuilder; use super::NargoConfig; use crate::errors::CliError; +/// Starts the Noir LSP server +/// +/// Starts an LSP server which allows IDEs such as VS Code to display diagnostics in Noir source. +/// +/// VS Code Noir Language Support: https://marketplace.visualstudio.com/items?itemName=noir-lang.vscode-noir #[derive(Debug, Clone, Args)] pub(crate) struct LspCommand; From 68f5887f9083e8194a9252d09ee0af363ffffa03 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Fri, 4 Aug 2023 19:10:01 +0100 Subject: [PATCH 07/18] fix: remove duplicated `name` option in `nargo new` (#2183) --- crates/nargo_cli/src/cli/new_cmd.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/crates/nargo_cli/src/cli/new_cmd.rs b/crates/nargo_cli/src/cli/new_cmd.rs index e67a046293d..85e2522a5a5 100644 --- a/crates/nargo_cli/src/cli/new_cmd.rs +++ b/crates/nargo_cli/src/cli/new_cmd.rs @@ -1,9 +1,6 @@ use crate::errors::CliError; -use super::{ - init_cmd::{initialize_project, InitCommand}, - NargoConfig, -}; +use super::{init_cmd::initialize_project, NargoConfig}; use acvm::Backend; use clap::Args; use nargo::package::PackageType; @@ -19,8 +16,13 @@ pub(crate) struct NewCommand { #[clap(long)] name: Option, - #[clap(flatten)] - init_config: InitCommand, + /// Use a library template + #[arg(long, conflicts_with = "bin")] + pub(crate) lib: bool, + + /// Use a binary template [default] + #[arg(long, conflicts_with = "lib")] + pub(crate) bin: bool, } pub(crate) fn run( @@ -37,8 +39,7 @@ pub(crate) fn run( let package_name = args.name.unwrap_or_else(|| args.path.file_name().unwrap().to_str().unwrap().to_owned()); - let package_type = - if args.init_config.lib { PackageType::Library } else { PackageType::Binary }; + let package_type = if args.lib { PackageType::Library } else { PackageType::Binary }; initialize_project(package_dir, &package_name, package_type); Ok(()) } From 9529157bd759d1ce1f632b732d76a58417ddfb51 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Fri, 4 Aug 2023 11:10:13 -0700 Subject: [PATCH 08/18] fix(nargo): Indicate which TOML file is missing package name (#2177) --- crates/nargo_cli/src/errors.rs | 3 +++ crates/nargo_cli/src/manifest.rs | 29 ++++++----------------------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/crates/nargo_cli/src/errors.rs b/crates/nargo_cli/src/errors.rs index 45d2dbae827..78db35728a4 100644 --- a/crates/nargo_cli/src/errors.rs +++ b/crates/nargo_cli/src/errors.rs @@ -142,4 +142,7 @@ pub(crate) enum ManifestError { #[error("Package `{0}` has type `bin` but you cannot depend on binary packages")] BinaryDependency(CrateName), + + #[error("Missing `name` field in {toml}")] + MissingNameField { toml: PathBuf }, } diff --git a/crates/nargo_cli/src/manifest.rs b/crates/nargo_cli/src/manifest.rs index c376c85b441..1f522a732d8 100644 --- a/crates/nargo_cli/src/manifest.rs +++ b/crates/nargo_cli/src/manifest.rs @@ -22,7 +22,11 @@ struct PackageConfig { impl PackageConfig { fn resolve_to_package(&self, root_dir: &Path) -> Result { - let name = self.package.name.parse().map_err(|_| ManifestError::InvalidPackageName)?; + let name = if let Some(name) = &self.package.name { + name.parse().map_err(|_| ManifestError::InvalidPackageName)? + } else { + return Err(ManifestError::MissingNameField { toml: root_dir.join("Nargo.toml") }); + }; let mut dependencies: BTreeMap = BTreeMap::new(); for (name, dep_config) in self.dependencies.iter() { @@ -113,8 +117,7 @@ struct WorkspaceConfig { #[allow(dead_code)] #[derive(Default, Debug, Deserialize, Clone)] struct PackageMetadata { - #[serde(default = "panic_missing_name")] - name: String, + name: Option, #[serde(alias = "type")] package_type: Option, description: Option, @@ -129,26 +132,6 @@ struct PackageMetadata { license: Option, } -// TODO: Remove this after a couple of breaking releases (added in 0.10.0) -fn panic_missing_name() -> String { - panic!( - r#" - -Failed to parse `Nargo.toml`. - -`Nargo.toml` now requires a "name" field for Noir packages. - -```toml -[package] -name = "package_name" -``` - -Modify your `Nargo.toml` similarly to above and rerun the command. - -"# - ) -} - #[derive(Debug, Deserialize, Clone)] #[serde(untagged)] /// Enum representing the different types of ways to From effb02afc78f379d023719a0d869f42e7109b05f Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Fri, 4 Aug 2023 11:10:30 -0700 Subject: [PATCH 09/18] feat(nargo): Support custom entry points specified in TOML (#2158) --- crates/nargo_cli/src/errors.rs | 9 +++- crates/nargo_cli/src/manifest.rs | 51 +++++++++++++----- crates/nargo_cli/tests/test_data/config.toml | 2 +- .../tests/test_data/custom_entry/Nargo.toml | 8 +++ .../tests/test_data/custom_entry/Prover.toml | 1 + .../test_data/custom_entry/src/foobarbaz.nr | 3 ++ .../custom_entry/target/custom_entry.json | 1 + .../test_data/custom_entry/target/witness.tr | Bin 0 -> 56 bytes .../custom_entry_not_found/Nargo.toml | 9 ++++ .../custom_entry_not_found/Prover.toml | 1 + .../custom_entry_not_found/src/main.nr | 3 ++ 11 files changed, 71 insertions(+), 17 deletions(-) create mode 100644 crates/nargo_cli/tests/test_data/custom_entry/Nargo.toml create mode 100644 crates/nargo_cli/tests/test_data/custom_entry/Prover.toml create mode 100644 crates/nargo_cli/tests/test_data/custom_entry/src/foobarbaz.nr create mode 100644 crates/nargo_cli/tests/test_data/custom_entry/target/custom_entry.json create mode 100644 crates/nargo_cli/tests/test_data/custom_entry/target/witness.tr create mode 100644 crates/nargo_cli/tests/test_data/custom_entry_not_found/Nargo.toml create mode 100644 crates/nargo_cli/tests/test_data/custom_entry_not_found/Prover.toml create mode 100644 crates/nargo_cli/tests/test_data/custom_entry_not_found/src/main.nr diff --git a/crates/nargo_cli/src/errors.rs b/crates/nargo_cli/src/errors.rs index 78db35728a4..ee7ea12f761 100644 --- a/crates/nargo_cli/src/errors.rs +++ b/crates/nargo_cli/src/errors.rs @@ -123,8 +123,13 @@ pub(crate) enum ManifestError { #[error("Unxpected workspace definition found in {0}")] UnexpectedWorkspace(PathBuf), - #[error("Cannot find file {0} which is required due to specifying the `{1}` package type")] - MissingEntryFile(PathBuf, PackageType), + #[error("Cannot find file {entry} which was specified as the `entry` field in {toml}")] + MissingEntryFile { toml: PathBuf, entry: PathBuf }, + + #[error( + r#"Cannot find file {entry} which is defaulted due to specifying `type = "{package_type}"` in {toml}"# + )] + MissingDefaultEntryFile { toml: PathBuf, entry: PathBuf, package_type: PackageType }, /// Invalid character `-` in package name #[error("invalid character `-` in package name")] diff --git a/crates/nargo_cli/src/manifest.rs b/crates/nargo_cli/src/manifest.rs index 1f522a732d8..b7b1d6d2d5c 100644 --- a/crates/nargo_cli/src/manifest.rs +++ b/crates/nargo_cli/src/manifest.rs @@ -48,22 +48,44 @@ impl PackageConfig { None => return Err(ManifestError::MissingPackageType(root_dir.join("Nargo.toml"))), }; - let entry_path = match package_type { - PackageType::Library => root_dir.join("src").join("lib").with_extension(FILE_EXTENSION), - PackageType::Binary => root_dir.join("src").join("main").with_extension(FILE_EXTENSION), + let entry_path = if let Some(entry_path) = &self.package.entry { + let custom_entry_path = root_dir.join(entry_path); + if custom_entry_path.exists() { + custom_entry_path + } else { + return Err(ManifestError::MissingEntryFile { + toml: root_dir.join("Nargo.toml"), + entry: custom_entry_path, + }); + } + } else { + let default_entry_path = match package_type { + PackageType::Library => { + root_dir.join("src").join("lib").with_extension(FILE_EXTENSION) + } + PackageType::Binary => { + root_dir.join("src").join("main").with_extension(FILE_EXTENSION) + } + }; + + if default_entry_path.exists() { + default_entry_path + } else { + return Err(ManifestError::MissingDefaultEntryFile { + toml: root_dir.join("Nargo.toml"), + entry: default_entry_path, + package_type, + }); + } }; - if entry_path.exists() { - Ok(Package { - root_dir: root_dir.to_path_buf(), - entry_path, - package_type, - name, - dependencies, - }) - } else { - Err(ManifestError::MissingEntryFile(entry_path, package_type)) - } + Ok(Package { + root_dir: root_dir.to_path_buf(), + entry_path, + package_type, + name, + dependencies, + }) } } @@ -120,6 +142,7 @@ struct PackageMetadata { name: Option, #[serde(alias = "type")] package_type: Option, + entry: Option, description: Option, authors: Option>, // If not compiler version is supplied, the latest is used diff --git a/crates/nargo_cli/tests/test_data/config.toml b/crates/nargo_cli/tests/test_data/config.toml index 61178563154..bc858bbc7f5 100644 --- a/crates/nargo_cli/tests/test_data/config.toml +++ b/crates/nargo_cli/tests/test_data/config.toml @@ -2,4 +2,4 @@ exclude = [] # List of tests (as their directory name) expecting to fail: if the test pass, we report an error. -fail = ["brillig_assert_fail", "dep_impl_primitive", "depend_on_bin", "workspace_fail", "workspace_missing_toml"] +fail = ["brillig_assert_fail", "custom_entry_not_found", "dep_impl_primitive", "depend_on_bin", "workspace_fail", "workspace_missing_toml"] diff --git a/crates/nargo_cli/tests/test_data/custom_entry/Nargo.toml b/crates/nargo_cli/tests/test_data/custom_entry/Nargo.toml new file mode 100644 index 00000000000..a8cc75072b1 --- /dev/null +++ b/crates/nargo_cli/tests/test_data/custom_entry/Nargo.toml @@ -0,0 +1,8 @@ +[package] +name = "custom_entry" +type = "bin" +entry = "src/foobarbaz.nr" +authors = [""] +compiler_version = "0.1" + +[dependencies] diff --git a/crates/nargo_cli/tests/test_data/custom_entry/Prover.toml b/crates/nargo_cli/tests/test_data/custom_entry/Prover.toml new file mode 100644 index 00000000000..4dd6b405159 --- /dev/null +++ b/crates/nargo_cli/tests/test_data/custom_entry/Prover.toml @@ -0,0 +1 @@ +x = "1" diff --git a/crates/nargo_cli/tests/test_data/custom_entry/src/foobarbaz.nr b/crates/nargo_cli/tests/test_data/custom_entry/src/foobarbaz.nr new file mode 100644 index 00000000000..00e94414c0b --- /dev/null +++ b/crates/nargo_cli/tests/test_data/custom_entry/src/foobarbaz.nr @@ -0,0 +1,3 @@ +fn main(x: Field) { + assert(x == 1); +} diff --git a/crates/nargo_cli/tests/test_data/custom_entry/target/custom_entry.json b/crates/nargo_cli/tests/test_data/custom_entry/target/custom_entry.json new file mode 100644 index 00000000000..2185644bd18 --- /dev/null +++ b/crates/nargo_cli/tests/test_data/custom_entry/target/custom_entry.json @@ -0,0 +1 @@ +{"backend":"acvm-backend-barretenberg","abi":{"parameters":[{"name":"x","type":{"kind":"field"},"visibility":"private"}],"param_witnesses":{"x":[1]},"return_type":null,"return_witnesses":[]},"bytecode":"H4sIAAAAAAAA/82SMQ7DIAxFTSAdexYbQzBbr1JUcv8jtAODRbPVSP2LEUjP/v7sALDDt7ZRH6PibyKnWIxHSr3ETkxPjLVJxpTbISSUJb+iMHdJUmqrBSsl7nTmyueAbYYs/2G4C//O2P9mx0I9r1fnMGWn328LPMHUZ97j/eLOtPmKkPwCbgC7D7vKd7DPCBXyr3fqphm13hKQ6RMhBQAA","proving_key":null,"verification_key":null} \ No newline at end of file diff --git a/crates/nargo_cli/tests/test_data/custom_entry/target/witness.tr b/crates/nargo_cli/tests/test_data/custom_entry/target/witness.tr new file mode 100644 index 0000000000000000000000000000000000000000..87be1158f1b5045b1b75e98684c63469362bdfb5 GIT binary patch literal 56 zcmb2|=3oE;rvGdEPjWIaa2(#lwn}=({}8TSjl3eixKvUuM&3Q%Z!(YDuY`5uM#hDY KIg%|H85jT+tP`C8 literal 0 HcmV?d00001 diff --git a/crates/nargo_cli/tests/test_data/custom_entry_not_found/Nargo.toml b/crates/nargo_cli/tests/test_data/custom_entry_not_found/Nargo.toml new file mode 100644 index 00000000000..0ccb94aff1a --- /dev/null +++ b/crates/nargo_cli/tests/test_data/custom_entry_not_found/Nargo.toml @@ -0,0 +1,9 @@ +[package] +name = "custom_entry" +type = "bin" +# Testing that this file is missing and doesn't fallback to default `main.nr` file +entry = "src/foobarbaz.nr" +authors = [""] +compiler_version = "0.1" + +[dependencies] diff --git a/crates/nargo_cli/tests/test_data/custom_entry_not_found/Prover.toml b/crates/nargo_cli/tests/test_data/custom_entry_not_found/Prover.toml new file mode 100644 index 00000000000..4dd6b405159 --- /dev/null +++ b/crates/nargo_cli/tests/test_data/custom_entry_not_found/Prover.toml @@ -0,0 +1 @@ +x = "1" diff --git a/crates/nargo_cli/tests/test_data/custom_entry_not_found/src/main.nr b/crates/nargo_cli/tests/test_data/custom_entry_not_found/src/main.nr new file mode 100644 index 00000000000..00e94414c0b --- /dev/null +++ b/crates/nargo_cli/tests/test_data/custom_entry_not_found/src/main.nr @@ -0,0 +1,3 @@ +fn main(x: Field) { + assert(x == 1); +} From 614ff43f1ec2ea0efcd93574ededbdc466837fde Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Mon, 7 Aug 2023 13:20:19 +0100 Subject: [PATCH 10/18] chore: remove stale comment (#2197) --- .../noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/crates/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs b/crates/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs index 779aaa559ed..2ce2cc95362 100644 --- a/crates/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs +++ b/crates/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs @@ -647,9 +647,6 @@ impl AcirContext { let lhs_expr = lhs_data.to_expression(); let rhs_expr = rhs_data.to_expression(); - // TODO: check what happens when we do (a as u8) >= (b as u32) - // TODO: The frontend should shout in this case - let predicate_data = &self.vars[&predicate]; let predicate = predicate_data.to_expression().into_owned(); From c519ad2017ecab5a96277d01b32bbae342aba05f Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Mon, 7 Aug 2023 15:07:22 +0100 Subject: [PATCH 11/18] chore: separate integration test cases into directories based on expected result (#2198) * chore: split expected failure and success cases in integration tests * chore: backwards compatibility for CI * chore: separate `compile_success` and `execution_success` tests * chore: update `.gitignore` --- .gitignore | 4 +- crates/nargo_cli/build.rs | 124 ++++++++++++------ .../brillig_assert_fail/Nargo.toml | 0 .../brillig_assert_fail}/Prover.toml | 0 .../brillig_assert_fail}/src/main.nr | 0 .../custom_entry_not_found/Nargo.toml | 0 .../custom_entry_not_found}/Prover.toml | 0 .../custom_entry_not_found}/src/main.nr | 0 .../dep_impl_primitive/Nargo.toml | 0 .../dep_impl_primitive/Prover.toml | 0 .../dep_impl_primitive/src/main.nr | 0 .../depend_on_bin/Nargo.toml | 0 .../depend_on_bin/Prover.toml | 0 .../depend_on_bin/src/main.nr | 0 .../workspace_fail}/Nargo.toml | 0 .../workspace_fail}/crates/a/Nargo.toml | 0 .../workspace_fail/crates/a/Prover.toml | 0 .../workspace_fail}/crates/a/src/main.nr | 0 .../workspace_fail}/crates/b/Nargo.toml | 0 .../workspace_fail/crates/b}/Prover.toml | 0 .../workspace_fail}/crates/b/src/main.nr | 0 .../workspace_missing_toml}/Nargo.toml | 0 .../crates/a}/Prover.toml | 0 .../crates}/a/src/main.nr | 0 .../crates}/b/Nargo.toml | 0 .../crates/b}/Prover.toml | 0 .../crates}/b/src/main.nr | 0 .../ec_baby_jubjub/Nargo.toml | 0 .../ec_baby_jubjub/src/main.nr | 0 .../higher_order_fn_selector/Nargo.toml | 0 .../higher_order_fn_selector/src/main.nr | 0 .../inner_outer_cl/Nargo.toml | 0 .../inner_outer_cl/src/main.nr | 0 .../let_stmt/Nargo.toml | 0 .../let_stmt}/Prover.toml | 0 .../let_stmt/src/main.nr | 0 .../numeric_generics/Nargo.toml | 0 .../numeric_generics}/Prover.toml | 0 .../numeric_generics/src/main.nr | 0 .../option/Nargo.toml | 0 .../option/src/main.nr | 0 .../to_bits/Nargo.toml | 0 .../to_bits/src/main.nr | 0 .../unit/Nargo.toml | 0 .../unit/src/main.nr | 0 crates/nargo_cli/tests/execute.rs | 1 + .../1327_concrete_in_generic/Nargo.toml | 0 .../1327_concrete_in_generic/Prover.toml | 0 .../1327_concrete_in_generic/src/main.nr | 0 .../target/1327_concrete_in_generic.json | 0 .../target/witness.tr | Bin .../1_mul/Nargo.toml | 0 .../1_mul/Prover.toml | 0 .../1_mul/src/main.nr | 0 .../1_mul/target/1_mul.json | 0 .../1_mul/target/witness.tr | Bin .../2_div/Nargo.toml | 0 .../2_div/Prover.toml | 0 .../2_div/src/main.nr | 0 .../2_div/target/2_div.json | 0 .../2_div/target/witness.tr | Bin .../3_add/Nargo.toml | 0 .../3_add/Prover.toml | 0 .../3_add/src/main.nr | 0 .../3_add/target/3_add.json | 0 .../3_add/target/witness.tr | Bin .../4_sub/Nargo.toml | 0 .../4_sub/Prover.toml | 0 .../4_sub/src/main.nr | 0 .../4_sub/target/4_sub.json | 0 .../4_sub/target/witness.tr | Bin .../5_over/Nargo.toml | 0 .../5_over/Prover.toml | 0 .../5_over/src/main.nr | 0 .../5_over/target/5_over.json | 0 .../5_over/target/witness.tr | Bin .../6/Nargo.toml | 0 .../6/Prover.toml | 0 .../6/src/main.nr | 0 .../6/target/6.json | 0 .../6/target/witness.tr | Bin .../6_array/Nargo.toml | 0 .../6_array/Prover.toml | 0 .../6_array/src/main.nr | 0 .../6_array/target/6_array.json | 0 .../6_array/target/witness.tr | Bin .../7/Nargo.toml | 0 .../7/Prover.toml | 0 .../7/src/main.nr | 0 .../7/target/7.json | 0 .../7/target/witness.tr | Bin .../7_function/Nargo.toml | 0 .../7_function/Prover.toml | 0 .../7_function/src/main.nr | 0 .../7_function/target/7_function.json | 0 .../7_function/target/witness.tr | Bin .../8_integration/Nargo.toml | 0 .../8_integration/Prover.toml | 0 .../8_integration/src/main.nr | 0 .../8_integration/target/8_integration.json | 0 .../8_integration/target/witness.tr | Bin .../9_conditional/Nargo.toml | 0 .../9_conditional/Prover.toml | 0 .../9_conditional/src/main.nr | 0 .../9_conditional/target/9_conditional.json | 0 .../9_conditional/target/witness.tr | Bin .../arithmetic_binary_operations/Nargo.toml | 0 .../arithmetic_binary_operations/Prover.toml | 0 .../arithmetic_binary_operations/src/main.nr | 0 .../target/arithmetic_binary_operations.json | 0 .../target/witness.tr | Bin .../array_dynamic/Nargo.toml | 0 .../array_dynamic/Prover.toml | 0 .../array_dynamic/src/main.nr | 0 .../array_dynamic/target/array_dynamic.json | 1 + .../array_dynamic/target/witness.tr | Bin 0 -> 511 bytes .../array_len/Nargo.toml | 0 .../array_len/Prover.toml | 0 .../array_len/src/main.nr | 0 .../array_len/target/array_len.json | 0 .../array_len/target/witness.tr | Bin .../array_neq/Nargo.toml | 0 .../array_neq/Prover.toml | 0 .../array_neq/src/main.nr | 0 .../array_neq/target/array_neq.json | 0 .../array_neq/target/witness.tr | Bin .../array_sort/Nargo.toml | 0 .../array_sort/Prover.toml | 0 .../array_sort/src/main.nr | 0 .../array_sort/target/array_sort.json | 0 .../array_sort/target/witness.tr | Bin .../assert/Nargo.toml | 0 .../assert}/Prover.toml | 0 .../assert}/src/main.nr | 0 .../assert/target/assert.json | 0 .../assert/target/witness.tr | Bin .../assert_statement/Nargo.toml | 0 .../assert_statement/Prover.toml | 0 .../assert_statement/src/main.nr | 0 .../target/assert_statement.json | 0 .../assert_statement/target/witness.tr | Bin .../assign_ex/Nargo.toml | 0 .../assign_ex/Prover.toml | 0 .../assign_ex/src/main.nr | 0 .../assign_ex/target/assign_ex.json | 0 .../assign_ex/target/witness.tr | Bin .../bit_and/Nargo.toml | 0 .../bit_and/Prover.toml | 0 .../bit_and/src/main.nr | 0 .../bit_and/target/bit_and.json | 0 .../bit_and/target/witness.tr | Bin .../bit_shifts_comptime/Nargo.toml | 0 .../bit_shifts_comptime/Prover.toml | 0 .../bit_shifts_comptime/src/main.nr | 0 .../target/bit_shifts_comptime.json | 0 .../bit_shifts_comptime/target/witness.tr | Bin .../bit_shifts_runtime/Nargo.toml | 0 .../bit_shifts_runtime/Prover.toml | 0 .../bit_shifts_runtime/src/main.nr | 0 .../target/bit_shifts_runtime.json | 0 .../bit_shifts_runtime/target/witness.tr | Bin .../blackbox_func_simple_call/Nargo.toml | 0 .../blackbox_func_simple_call/Prover.toml | 0 .../blackbox_func_simple_call/src/main.nr | 0 .../target/blackbox_func_simple_call.json | 0 .../target/witness.tr | Bin .../bool_not/Nargo.toml | 0 .../bool_not}/Prover.toml | 0 .../bool_not/src/main.nr | 0 .../bool_not/target/bool_not.json | 0 .../bool_not/target/witness.tr | Bin .../bool_or/Nargo.toml | 0 .../bool_or}/Prover.toml | 0 .../bool_or/src/main.nr | 0 .../bool_or/target/bool_or.json | 0 .../bool_or/target/witness.tr | Bin .../brillig_acir_as_brillig/Nargo.toml | 0 .../brillig_acir_as_brillig}/Prover.toml | 0 .../brillig_acir_as_brillig/src/main.nr | 0 .../target/brillig_acir_as_brillig.json | 0 .../brillig_acir_as_brillig/target/witness.tr | Bin .../brillig_arrays/Nargo.toml | 0 .../brillig_arrays/Prover.toml | 0 .../brillig_arrays/src/main.nr | 0 .../brillig_arrays/target/brillig_arrays.json | 0 .../brillig_arrays/target/witness.tr | Bin .../brillig_assert/Nargo.toml | 0 .../brillig_assert}/Prover.toml | 0 .../brillig_assert}/src/main.nr | 0 .../brillig_assert/target/brillig_assert.json | 0 .../brillig_assert/target/witness.tr | Bin .../brillig_blake2s/Nargo.toml | 0 .../brillig_blake2s/Prover.toml | 0 .../brillig_blake2s/src/main.nr | 0 .../target/brillig_blake2s.json | 0 .../brillig_blake2s/target/witness.tr | Bin .../brillig_calls/Nargo.toml | 0 .../brillig_calls/Prover.toml | 0 .../brillig_calls/src/main.nr | 0 .../brillig_calls/target/brillig_calls.json | 0 .../brillig_calls/target/witness.tr | Bin .../brillig_calls_array/Nargo.toml | 0 .../brillig_calls_array/Prover.toml | 0 .../brillig_calls_array/src/main.nr | 0 .../target/brillig_calls_array.json | 0 .../brillig_calls_array/target/witness.tr | Bin .../brillig_calls_conditionals/Nargo.toml | 0 .../brillig_calls_conditionals/Prover.toml | 0 .../brillig_calls_conditionals/src/main.nr | 0 .../target/brillig_calls_conditionals.json | 0 .../target/witness.tr | Bin .../brillig_cast/Nargo.toml | 0 .../brillig_cast}/Prover.toml | 0 .../brillig_cast/src/main.nr | 0 .../brillig_cast/target/brillig_cast.json | 0 .../brillig_cast/target/witness.tr | Bin .../brillig_conditional/Nargo.toml | 0 .../brillig_conditional}/Prover.toml | 0 .../brillig_conditional/src/main.nr | 0 .../target/brillig_conditional.json | 0 .../brillig_conditional/target/witness.tr | Bin .../brillig_ecdsa/Nargo.toml | 0 .../brillig_ecdsa/Prover.toml | 0 .../brillig_ecdsa/src/main.nr | 0 .../brillig_ecdsa/target/brillig_ecdsa.json | 0 .../brillig_ecdsa/target/witness.tr | Bin .../Nargo.toml | 0 .../Prover.toml | 0 .../src/main.nr | 0 .../brillig_field_binary_operations.json | 0 .../target/witness.tr | Bin .../brillig_fns_as_values/Nargo.toml | 0 .../brillig_fns_as_values/Prover.toml | 0 .../brillig_fns_as_values/src/main.nr | 0 .../target/brillig_fns_as_values.json | 0 .../brillig_fns_as_values/target/witness.tr | Bin .../brillig_hash_to_field/Nargo.toml | 0 .../brillig_hash_to_field/Prover.toml | 0 .../brillig_hash_to_field/src/main.nr | 0 .../target/brillig_hash_to_field.json | 0 .../brillig_hash_to_field/target/witness.tr | Bin .../brillig_identity_function/Nargo.toml | 0 .../brillig_identity_function/Prover.toml | 0 .../brillig_identity_function/src/main.nr | 0 .../target/brillig_identity_function.json | 0 .../target/witness.tr | Bin .../Nargo.toml | 0 .../Prover.toml | 0 .../src/main.nr | 0 .../brillig_integer_binary_operations.json | 0 .../target/witness.tr | Bin .../brillig_keccak/Nargo.toml | 0 .../brillig_keccak/Prover.toml | 0 .../brillig_keccak/src/main.nr | 0 .../brillig_keccak/target/brillig_keccak.json | 0 .../brillig_keccak/target/witness.tr | Bin .../brillig_loop/Nargo.toml | 0 .../brillig_loop/Prover.toml | 0 .../brillig_loop/src/main.nr | 0 .../brillig_loop/target/brillig_loop.json | 0 .../brillig_loop/target/witness.tr | Bin .../brillig_modulo/Nargo.toml | 0 .../brillig_modulo}/Prover.toml | 0 .../brillig_modulo/src/main.nr | 0 .../brillig_modulo/target/brillig_modulo.json | 0 .../brillig_modulo/target/witness.tr | Bin .../brillig_nested_arrays/Nargo.toml | 0 .../brillig_nested_arrays/Prover.toml | 0 .../brillig_nested_arrays/src/main.nr | 0 .../target/brillig_nested_arrays.json | 0 .../brillig_nested_arrays/target/witness.tr | Bin .../brillig_not/Nargo.toml | 0 .../brillig_not}/Prover.toml | 0 .../brillig_not/src/main.nr | 0 .../brillig_not/target/brillig_not.json | 0 .../brillig_not/target/witness.tr | Bin .../brillig_oracle/Nargo.toml | 0 .../brillig_oracle/Prover.toml | 0 .../brillig_oracle/src/main.nr | 0 .../brillig_oracle/target/brillig_oracle.json | 0 .../brillig_oracle/target/witness.tr | Bin .../brillig_pedersen/Nargo.toml | 0 .../brillig_pedersen/Prover.toml | 0 .../brillig_pedersen/src/main.nr | 0 .../target/brillig_pedersen.json | 0 .../brillig_pedersen/target/witness.tr | Bin .../brillig_recursion/Nargo.toml | 0 .../brillig_recursion/Prover.toml | 0 .../brillig_recursion/src/main.nr | 0 .../target/brillig_recursion.json | 0 .../brillig_recursion/target/witness.tr | Bin .../brillig_references/Nargo.toml | 0 .../brillig_references/Prover.toml | 0 .../brillig_references/src/main.nr | 0 .../target/brillig_references.json | 0 .../brillig_references/target/witness.tr | Bin .../brillig_scalar_mul/Nargo.toml | 0 .../brillig_scalar_mul/Prover.toml | 0 .../brillig_scalar_mul/src/main.nr | 0 .../target/brillig_scalar_mul.json | 0 .../brillig_scalar_mul/target/witness.tr | Bin .../brillig_schnorr/Nargo.toml | 0 .../brillig_schnorr/Prover.toml | 0 .../brillig_schnorr/src/main.nr | 0 .../target/brillig_schnorr.json | 0 .../brillig_schnorr/target/witness.tr | Bin .../brillig_sha256/Nargo.toml | 0 .../brillig_sha256/Prover.toml | 0 .../brillig_sha256/src/main.nr | 0 .../brillig_sha256/target/brillig_sha256.json | 0 .../brillig_sha256/target/witness.tr | Bin .../brillig_slices/Nargo.toml | 0 .../brillig_slices/Prover.toml | 0 .../brillig_slices/src/main.nr | 0 .../brillig_slices/target/brillig_slices.json | 0 .../brillig_slices/target/witness.tr | Bin .../brillig_to_be_bytes/Nargo.toml | 0 .../brillig_to_be_bytes/Prover.toml | 0 .../brillig_to_be_bytes/src/main.nr | 0 .../target/brillig_to_be_bytes.json | 0 .../brillig_to_be_bytes/target/witness.tr | Bin .../brillig_to_bits/Nargo.toml | 0 .../brillig_to_bits/src/main.nr | 0 .../target/brillig_to_bits.json | 0 .../brillig_to_bits/target/witness.tr | Bin .../brillig_to_bytes_integration/Nargo.toml | 0 .../brillig_to_bytes_integration/Prover.toml | 0 .../brillig_to_bytes_integration/src/main.nr | 0 .../target/brillig_to_bytes_integration.json | 0 .../target/witness.tr | Bin .../brillig_to_le_bytes/Nargo.toml | 0 .../brillig_to_le_bytes/Prover.toml | 0 .../brillig_to_le_bytes/src/main.nr | 0 .../target/brillig_to_le_bytes.json | 0 .../brillig_to_le_bytes/target/witness.tr | Bin .../brillig_top_level/Nargo.toml | 0 .../brillig_top_level/Prover.toml | 0 .../brillig_top_level/src/main.nr | 0 .../target/brillig_top_level.json | 0 .../brillig_top_level/target/witness.tr | Bin .../cast_bool/Nargo.toml | 0 .../cast_bool/Prover.toml | 0 .../cast_bool/src/main.nr | 0 .../cast_bool/target/cast_bool.json | 0 .../cast_bool/target/witness.tr | Bin .../closures_mut_ref/Nargo.toml | 0 .../closures_mut_ref/Prover.toml | 0 .../closures_mut_ref/src/main.nr | 0 .../target/closures_mut_ref.json | 0 .../closures_mut_ref/target/witness.tr | Bin .../comptime_array_access/Nargo.toml | 0 .../comptime_array_access/Prover.toml | 0 .../comptime_array_access/src/main.nr | 0 .../target/comptime_array_access.json | 0 .../comptime_array_access/target/witness.tr | Bin .../comptime_recursion_regression/Nargo.toml | 0 .../comptime_recursion_regression/Prover.toml | 0 .../comptime_recursion_regression/src/main.nr | 0 .../target/comptime_recursion_regression.json | 0 .../target/witness.tr | Bin .../tests/execution_success/config.toml | 3 + .../constant_return/Nargo.toml | 0 .../constant_return/Prover.toml | 0 .../constant_return/src/main.nr | 0 .../target/constant_return.json | 0 .../constant_return/target/witness.tr | Bin .../contracts/Nargo.toml | 0 .../contracts/Prover.toml | 0 .../contracts/src/main.nr | 0 .../contracts/target/contracts.json | 0 .../contracts/target/witness.tr | Bin .../custom_entry/Nargo.toml | 0 .../custom_entry}/Prover.toml | 0 .../custom_entry/src/foobarbaz.nr | 0 .../custom_entry/target/custom_entry.json | 0 .../custom_entry/target/witness.tr | Bin .../debug_logs/Nargo.toml | 0 .../debug_logs/Prover.toml | 0 .../debug_logs/src/main.nr | 0 .../debug_logs/target/debug_logs.json | 0 .../debug_logs/target/witness.tr | Bin .../diamond_deps_0/Nargo.toml | 0 .../diamond_deps_0/Prover.toml | 0 .../diamond_deps_0/src/main.nr | 0 .../diamond_deps_0/target/diamond_deps_0.json | 0 .../diamond_deps_0/target/witness.tr | Bin .../distinct_keyword/Nargo.toml | 0 .../distinct_keyword/Prover.toml | 0 .../distinct_keyword/src/main.nr | 0 .../target/distinct_keyword.json | 0 .../distinct_keyword/target/witness.tr | Bin .../ecdsa_secp256k1/Nargo.toml | 0 .../ecdsa_secp256k1/Prover.toml | 0 .../ecdsa_secp256k1/src/main.nr | 0 .../target/ecdsa_secp256k1.json | 0 .../ecdsa_secp256k1/target/witness.tr | Bin .../ecdsa_secp256r1/Nargo.toml | 0 .../ecdsa_secp256r1/Prover.toml | 0 .../ecdsa_secp256r1/src/main.nr | 0 .../target/ecdsa_secp256r1.json | 0 .../ecdsa_secp256r1/target/witness.tr | Bin .../generics/Nargo.toml | 0 .../generics/Prover.toml | 0 .../generics/src/main.nr | 0 .../generics/target/generics.json | 0 .../generics/target/witness.tr | Bin .../global_consts/Nargo.toml | 0 .../global_consts/Prover.toml | 0 .../global_consts/src/baz.nr | 0 .../global_consts/src/foo.nr | 0 .../global_consts/src/foo/bar.nr | 0 .../global_consts/src/main.nr | 0 .../global_consts/target/global_consts.json | 0 .../global_consts/target/witness.tr | Bin .../hash_to_field/Nargo.toml | 0 .../hash_to_field/Prover.toml | 0 .../hash_to_field/src/main.nr | 0 .../hash_to_field/target/hash_to_field.json | 0 .../hash_to_field/target/witness.tr | Bin .../higher_order_functions/Nargo.toml | 0 .../higher_order_functions}/Prover.toml | 0 .../higher_order_functions/src/main.nr | 0 .../target/higher_order_functions.json | 0 .../higher_order_functions/target/witness.tr | Bin .../if_else_chain/Nargo.toml | 0 .../if_else_chain/Prover.toml | 0 .../if_else_chain/src/main.nr | 0 .../if_else_chain/target/if_else_chain.json | 0 .../if_else_chain/target/witness.tr | Bin .../integer_array_indexing/Nargo.toml | 0 .../integer_array_indexing/Prover.toml | 0 .../integer_array_indexing/src/main.nr | 0 .../target/integer_array_indexing.json | 0 .../integer_array_indexing/target/witness.tr | Bin .../keccak256/Nargo.toml | 0 .../keccak256/Prover.toml | 0 .../keccak256/src/main.nr | 0 .../keccak256/target/keccak256.json | 0 .../keccak256/target/witness.tr | Bin .../main_bool_arg/Nargo.toml | 0 .../main_bool_arg/Prover.toml | 0 .../main_bool_arg/src/main.nr | 0 .../main_bool_arg/target/main_bool_arg.json | 0 .../main_bool_arg/target/witness.tr | Bin .../main_return/Nargo.toml | 0 .../main_return/Prover.toml | 0 .../main_return/src/main.nr | 0 .../main_return/target/main_return.json | 0 .../main_return/target/witness.tr | Bin .../merkle_insert/Nargo.toml | 0 .../merkle_insert/Prover.toml | 0 .../merkle_insert/src/main.nr | 0 .../merkle_insert/target/merkle_insert.json | 0 .../merkle_insert/target/witness.tr | Bin .../modules/Nargo.toml | 0 .../modules/Prover.toml | 0 .../modules/src/foo.nr | 0 .../modules/src/main.nr | 0 .../modules/target/modules.json | 0 .../modules/target/witness.tr | Bin .../modules_more/Nargo.toml | 0 .../modules_more/Prover.toml | 0 .../modules_more/src/foo.nr | 0 .../modules_more/src/foo/bar.nr | 0 .../modules_more/src/main.nr | 0 .../modules_more/target/modules_more.json | 0 .../modules_more/target/witness.tr | Bin .../modulus/Nargo.toml | 0 .../modulus/Prover.toml | 0 .../modulus/src/main.nr | 0 .../modulus/target/modulus.json | 0 .../modulus/target/witness.tr | Bin .../nested_arrays_from_brillig/Nargo.toml | 0 .../nested_arrays_from_brillig/Prover.toml | 0 .../nested_arrays_from_brillig/src/main.nr | 0 .../target/nested_arrays_from_brillig.json | 0 .../target/witness.tr | Bin .../pedersen_check/Nargo.toml | 0 .../pedersen_check/Prover.toml | 0 .../pedersen_check/src/main.nr | 0 .../pedersen_check/target/pedersen_check.json | 0 .../pedersen_check/target/witness.tr | Bin .../poseidon_bn254_hash/Nargo.toml | 0 .../poseidon_bn254_hash/Prover.toml | 0 .../poseidon_bn254_hash/src/main.nr | 0 .../target/poseidon_bn254_hash.json | 0 .../poseidon_bn254_hash/target/witness.tr | Bin .../poseidonsponge_x5_254/Nargo.toml | 0 .../poseidonsponge_x5_254/Prover.toml | 0 .../poseidonsponge_x5_254/src/main.nr | 0 .../target/poseidonsponge_x5_254.json | 0 .../poseidonsponge_x5_254/target/witness.tr | Bin .../pred_eq/Nargo.toml | 0 .../pred_eq}/Prover.toml | 0 .../pred_eq/src/main.nr | 0 .../pred_eq/target/pred_eq.json | 0 .../pred_eq/target/witness.tr | Bin .../tests/execution_success/rebuild.sh | 22 ++++ .../references/Nargo.toml | 0 .../references/Prover.toml | 0 .../references/src/main.nr | 0 .../references/target/references.json | 0 .../references/target/witness.tr | Bin .../regression/Nargo.toml | 0 .../regression/Prover.toml | 0 .../regression/src/main.nr | 0 .../regression/target/regression.json | 0 .../regression/target/witness.tr | Bin .../regression_2099/Nargo.toml | 0 .../regression_2099/src/main.nr | 0 .../target/regression_2099.json | 0 .../regression_2099}/target/witness.tr | Bin .../Nargo.toml | 0 .../Prover.toml | 0 .../src/main.nr | 0 .../regression_method_cannot_be_found.json | 0 .../target/witness.tr | Bin .../ret_fn_ret_cl/Nargo.toml | 0 .../ret_fn_ret_cl/Prover.toml | 0 .../ret_fn_ret_cl/src/main.nr | 0 .../ret_fn_ret_cl/target/ret_fn_ret_cl.json | 0 .../ret_fn_ret_cl/target/witness.tr | Bin .../scalar_mul/Nargo.toml | 0 .../scalar_mul/Prover.toml | 0 .../scalar_mul/src/main.nr | 0 .../scalar_mul/target/scalar_mul.json | 0 .../scalar_mul/target/witness.tr | Bin .../schnorr/Nargo.toml | 0 .../schnorr/Prover.toml | 0 .../schnorr/src/main.nr | 0 .../schnorr/target/schnorr.json | 0 .../schnorr/target/witness.tr | Bin .../sha256/Nargo.toml | 0 .../sha256/Prover.toml | 0 .../sha256/src/main.nr | 0 .../sha256/target/sha256.json | 0 .../sha256/target/witness.tr | Bin .../sha2_blocks/Nargo.toml | 0 .../sha2_blocks/Prover.toml | 0 .../sha2_blocks/src/main.nr | 0 .../sha2_blocks/target/sha2_blocks.json | 0 .../sha2_blocks/target/witness.tr | Bin .../sha2_byte/Nargo.toml | 0 .../sha2_byte/Prover.toml | 0 .../sha2_byte/src/main.nr | 0 .../sha2_byte/target/sha2_byte.json | 0 .../sha2_byte/target/witness.tr | Bin .../signed_division/Nargo.toml | 0 .../signed_division/Prover.toml | 0 .../signed_division/src/main.nr | 0 .../target/signed_division.json | 0 .../signed_division/target/witness.tr | Bin .../simple_add_and_ret_arr/Nargo.toml | 0 .../simple_add_and_ret_arr/Prover.toml | 0 .../simple_add_and_ret_arr/src/main.nr | 0 .../target/simple_add_and_ret_arr.json | 0 .../simple_add_and_ret_arr/target/witness.tr | Bin .../simple_array_param/Nargo.toml | 0 .../simple_array_param/Prover.toml | 0 .../simple_array_param/src/main.nr | 0 .../target/simple_array_param.json | 0 .../simple_array_param/target/witness.tr | Bin .../simple_bitwise/Nargo.toml | 0 .../simple_bitwise/Prover.toml | 0 .../simple_bitwise/src/main.nr | 0 .../simple_bitwise/target/simple_bitwise.json | 0 .../simple_bitwise/target/witness.tr | Bin .../simple_comparison/Nargo.toml | 0 .../simple_comparison/Prover.toml | 0 .../simple_comparison/src/main.nr | 0 .../target/simple_comparison.json | 0 .../simple_comparison/target/witness.tr | Bin .../simple_mut/Nargo.toml | 0 .../simple_mut/Prover.toml | 0 .../simple_mut/src/main.nr | 0 .../simple_mut/target/simple_mut.json | 0 .../simple_mut/target/witness.tr | Bin .../simple_not/Nargo.toml | 0 .../simple_not/Prover.toml | 0 .../simple_not/src/main.nr | 0 .../simple_not/target/simple_not.json | 0 .../simple_not/target/witness.tr | Bin .../simple_print/Nargo.toml | 0 .../simple_print/Prover.toml | 0 .../simple_print/src/main.nr | 0 .../simple_print/target/simple_print.json | 0 .../simple_print/target/witness.tr | Bin .../simple_program_addition/Nargo.toml | 0 .../simple_program_addition/Prover.toml | 0 .../simple_program_addition/src/main.nr | 0 .../target/simple_program_addition.json | 0 .../simple_program_addition/target/witness.tr | Bin .../simple_program_no_body/Nargo.toml | 0 .../simple_program_no_body/Prover.toml | 0 .../simple_program_no_body/src/main.nr | 0 .../target/simple_program_no_body.json | 0 .../simple_program_no_body/target/witness.tr | Bin .../simple_radix/Nargo.toml | 0 .../simple_radix/Prover.toml | 0 .../simple_radix/src/main.nr | 0 .../simple_radix/target/simple_radix.json | 0 .../simple_radix/target/witness.tr | Bin .../simple_range/Nargo.toml | 0 .../simple_range/Prover.toml | 0 .../simple_range/src/main.nr | 0 .../simple_range/target/simple_range.json | 0 .../simple_range/target/witness.tr | Bin .../simple_shield/Nargo.toml | 0 .../simple_shield/Prover.toml | 0 .../simple_shield/src/main.nr | 0 .../simple_shield/target/simple_shield.json | 0 .../simple_shield/target/witness.tr | Bin .../simple_shift_left_right/Nargo.toml | 0 .../simple_shift_left_right/Prover.toml | 0 .../simple_shift_left_right/src/main.nr | 0 .../target/simple_shift_left_right.json | 0 .../simple_shift_left_right/target/witness.tr | Bin .../slices/Nargo.toml | 0 .../slices/Prover.toml | 0 .../slices/src/main.nr | 0 .../slices/target/slices.json | 0 .../slices/target/witness.tr | Bin .../strings/Nargo.toml | 0 .../strings/Prover.toml | 0 .../strings/src/main.nr | 0 .../strings/target/strings.json | 0 .../strings/target/witness.tr | Bin .../struct/Nargo.toml | 0 .../struct/Prover.toml | 0 .../struct/src/main.nr | 0 .../struct/target/struct.json | 0 .../struct/target/witness.tr | Bin .../struct_array_inputs/Nargo.toml | 0 .../struct_array_inputs/Prover.toml | 0 .../struct_array_inputs/src/main.nr | 0 .../target/struct_array_inputs.json | 0 .../struct_array_inputs/target/witness.tr | Bin .../struct_fields_ordering/Nargo.toml | 0 .../struct_fields_ordering/Prover.toml | 0 .../struct_fields_ordering/src/main.nr | 0 .../target/struct_fields_ordering.json | 0 .../struct_fields_ordering/target/witness.tr | Bin .../struct_inputs/Nargo.toml | 0 .../struct_inputs/Prover.toml | 0 .../struct_inputs/src/foo.nr | 0 .../struct_inputs/src/foo/bar.nr | 0 .../struct_inputs/src/main.nr | 0 .../struct_inputs/target/struct_inputs.json | 0 .../struct_inputs/target/witness.tr | Bin .../submodules/Nargo.toml | 0 .../submodules/Prover.toml | 0 .../submodules/src/main.nr | 0 .../submodules/target/submodules.json | 0 .../submodules/target/witness.tr | Bin .../to_be_bytes/Nargo.toml | 0 .../to_be_bytes/Prover.toml | 0 .../to_be_bytes/src/main.nr | 0 .../to_be_bytes/target/to_be_bytes.json | 0 .../to_be_bytes/target/witness.tr | Bin .../to_bytes_integration/Nargo.toml | 0 .../to_bytes_integration/Prover.toml | 0 .../to_bytes_integration/src/main.nr | 0 .../target/to_bytes_integration.json | 0 .../to_bytes_integration/target/witness.tr | Bin .../to_le_bytes/Nargo.toml | 0 .../to_le_bytes/Prover.toml | 0 .../to_le_bytes/src/main.nr | 0 .../to_le_bytes/target/to_le_bytes.json | 0 .../to_le_bytes/target/witness.tr | Bin .../tuples/Nargo.toml | 0 .../tuples}/Prover.toml | 0 .../tuples/src/main.nr | 0 .../tuples/target/tuples.json | 0 .../tuples/target/witness.tr | Bin .../type_aliases/Nargo.toml | 0 .../type_aliases/Prover.toml | 0 .../type_aliases/src/main.nr | 0 .../type_aliases/target/type_aliases.json | 0 .../type_aliases/target/witness.tr | Bin .../unconstrained_empty/Nargo.toml | 0 .../unconstrained_empty/Prover.toml | 0 .../unconstrained_empty/src/main.nr | 0 .../target/unconstrained_empty.json | 0 .../unconstrained_empty}/target/witness.tr | Bin .../vectors/Nargo.toml | 0 .../vectors/Prover.toml | 0 .../vectors/src/main.nr | 0 .../vectors/target/vectors.json | 0 .../vectors/target/witness.tr | Bin .../workspace}/Nargo.toml | 0 .../workspace}/Prover.toml | 0 .../workspace/crates}/a/Nargo.toml | 0 .../workspace/crates}/a/Prover.toml | 0 .../workspace}/crates/a/src/main.nr | 0 .../workspace}/crates/b/Nargo.toml | 0 .../workspace}/crates/b/Prover.toml | 0 .../workspace}/crates/b/src/main.nr | 0 .../workspace_default_member/Nargo.toml | 0 .../workspace_default_member/Prover.toml | 0 .../workspace_default_member}/a/Nargo.toml | 0 .../workspace_default_member}/a/Prover.toml | 0 .../workspace_default_member}/a/src/main.nr | 0 .../workspace_default_member}/b/Nargo.toml | 0 .../workspace_default_member/b/Prover.toml | 0 .../workspace_default_member}/b/src/main.nr | 0 .../workspace_default_member/target/a.json | 0 .../target/witness.tr | Bin .../xor/Nargo.toml | 0 .../xor/Prover.toml | 0 .../xor/src/main.nr | 0 .../xor/target/witness.tr | Bin .../xor/target/xor.json | 0 crates/nargo_cli/tests/test_data | 1 + .../array_dynamic/target/array_dynamic.json | 1 - .../test_data/array_dynamic/target/witness.tr | Bin 581 -> 0 bytes crates/nargo_cli/tests/test_data/config.toml | 5 - .../ec_baby_jubjub/target/ec_baby_jubjub.json | 1 - .../target/higher_order_fn_selector.json | 1 - .../inner_outer_cl/target/inner_outer_cl.json | 1 - .../test_data/let_stmt/target/let_stmt.json | 1 - .../test_data/let_stmt/target/witness.tr | Bin 23 -> 0 bytes .../target/numeric_generics.json | 1 - .../numeric_generics/target/witness.tr | Bin 23 -> 0 bytes .../tests/test_data/option/target/option.json | 1 - .../tests/test_data/option/target/witness.tr | Bin 23 -> 0 bytes crates/nargo_cli/tests/test_data/rebuild.sh | 31 ----- .../regression_2099/target/witness.tr | Bin 23 -> 0 bytes .../target/witness.tr | Bin 23 -> 0 bytes .../test_data/to_bits/target/to_bits.json | 1 - .../tests/test_data/to_bits/target/witness.tr | Bin 23 -> 0 bytes .../unconstrained_empty/target/witness.tr | Bin 23 -> 0 bytes .../tests/test_data/unit/target/unit.json | 1 - .../tests/test_data/unit/target/witness.tr | Bin 23 -> 0 bytes 733 files changed, 115 insertions(+), 86 deletions(-) rename crates/nargo_cli/tests/{test_data => compile_failure}/brillig_assert_fail/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/brillig_acir_as_brillig => compile_failure/brillig_assert_fail}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data/brillig_assert => compile_failure/brillig_assert_fail}/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => compile_failure}/custom_entry_not_found/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/assert => compile_failure/custom_entry_not_found}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data/assert => compile_failure/custom_entry_not_found}/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => compile_failure}/dep_impl_primitive/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => compile_failure}/dep_impl_primitive/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => compile_failure}/dep_impl_primitive/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => compile_failure}/depend_on_bin/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => compile_failure}/depend_on_bin/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => compile_failure}/depend_on_bin/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data/workspace => compile_failure/workspace_fail}/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace => compile_failure/workspace_fail}/crates/a/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => compile_failure}/workspace_fail/crates/a/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace => compile_failure/workspace_fail}/crates/a/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data/workspace => compile_failure/workspace_fail}/crates/b/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/bool_or => compile_failure/workspace_fail/crates/b}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace => compile_failure/workspace_fail}/crates/b/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data/workspace_fail => compile_failure/workspace_missing_toml}/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/pred_eq => compile_failure/workspace_missing_toml/crates/a}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace_default_member => compile_failure/workspace_missing_toml/crates}/a/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data/workspace_default_member => compile_failure/workspace_missing_toml/crates}/b/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/brillig_not => compile_failure/workspace_missing_toml/crates/b}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace_default_member => compile_failure/workspace_missing_toml/crates}/b/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => compile_success}/ec_baby_jubjub/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => compile_success}/ec_baby_jubjub/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => compile_success}/higher_order_fn_selector/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => compile_success}/higher_order_fn_selector/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => compile_success}/inner_outer_cl/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => compile_success}/inner_outer_cl/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => compile_success}/let_stmt/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/brillig_cast => compile_success/let_stmt}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => compile_success}/let_stmt/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => compile_success}/numeric_generics/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/brillig_field_binary_operations => compile_success/numeric_generics}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => compile_success}/numeric_generics/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => compile_success}/option/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => compile_success}/option/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => compile_success}/to_bits/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => compile_success}/to_bits/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => compile_success}/unit/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => compile_success}/unit/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/1327_concrete_in_generic/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/1327_concrete_in_generic/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/1327_concrete_in_generic/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/1327_concrete_in_generic/target/1327_concrete_in_generic.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/1327_concrete_in_generic/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/1_mul/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/1_mul/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/1_mul/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/1_mul/target/1_mul.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/1_mul/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/2_div/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/2_div/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/2_div/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/2_div/target/2_div.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/2_div/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/3_add/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/3_add/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/3_add/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/3_add/target/3_add.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/3_add/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/4_sub/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/4_sub/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/4_sub/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/4_sub/target/4_sub.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/4_sub/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/5_over/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/5_over/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/5_over/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/5_over/target/5_over.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/5_over/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/6/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/6/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/6/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/6/target/6.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/6/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/6_array/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/6_array/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/6_array/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/6_array/target/6_array.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/6_array/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/7/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/7/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/7/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/7/target/7.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/7/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/7_function/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/7_function/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/7_function/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/7_function/target/7_function.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/7_function/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/8_integration/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/8_integration/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/8_integration/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/8_integration/target/8_integration.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/8_integration/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/9_conditional/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/9_conditional/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/9_conditional/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/9_conditional/target/9_conditional.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/9_conditional/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/arithmetic_binary_operations/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/arithmetic_binary_operations/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/arithmetic_binary_operations/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/arithmetic_binary_operations/target/arithmetic_binary_operations.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/arithmetic_binary_operations/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/array_dynamic/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/array_dynamic/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/array_dynamic/src/main.nr (100%) create mode 100644 crates/nargo_cli/tests/execution_success/array_dynamic/target/array_dynamic.json create mode 100644 crates/nargo_cli/tests/execution_success/array_dynamic/target/witness.tr rename crates/nargo_cli/tests/{test_data => execution_success}/array_len/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/array_len/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/array_len/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/array_len/target/array_len.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/array_len/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/array_neq/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/array_neq/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/array_neq/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/array_neq/target/array_neq.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/array_neq/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/array_sort/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/array_sort/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/array_sort/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/array_sort/target/array_sort.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/array_sort/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/assert/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/bool_not => execution_success/assert}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data/custom_entry_not_found => execution_success/assert}/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/assert/target/assert.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/assert/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/assert_statement/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/assert_statement/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/assert_statement/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/assert_statement/target/assert_statement.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/assert_statement/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/assign_ex/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/assign_ex/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/assign_ex/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/assign_ex/target/assign_ex.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/assign_ex/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bit_and/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bit_and/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bit_and/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bit_and/target/bit_and.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bit_and/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bit_shifts_comptime/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bit_shifts_comptime/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bit_shifts_comptime/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bit_shifts_comptime/target/bit_shifts_comptime.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bit_shifts_comptime/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bit_shifts_runtime/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bit_shifts_runtime/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bit_shifts_runtime/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bit_shifts_runtime/target/bit_shifts_runtime.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bit_shifts_runtime/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/blackbox_func_simple_call/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/blackbox_func_simple_call/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/blackbox_func_simple_call/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/blackbox_func_simple_call/target/blackbox_func_simple_call.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/blackbox_func_simple_call/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bool_not/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/brillig_assert => execution_success/bool_not}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bool_not/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bool_not/target/bool_not.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bool_not/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bool_or/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/tuples => execution_success/bool_or}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bool_or/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bool_or/target/bool_or.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/bool_or/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_acir_as_brillig/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/brillig_assert_fail => execution_success/brillig_acir_as_brillig}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_acir_as_brillig/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_acir_as_brillig/target/brillig_acir_as_brillig.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_acir_as_brillig/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_arrays/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_arrays/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_arrays/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_arrays/target/brillig_arrays.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_arrays/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_assert/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/brillig_conditional => execution_success/brillig_assert}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data/brillig_assert_fail => execution_success/brillig_assert}/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_assert/target/brillig_assert.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_assert/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_blake2s/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_blake2s/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_blake2s/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_blake2s/target/brillig_blake2s.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_blake2s/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_calls/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_calls/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_calls/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_calls/target/brillig_calls.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_calls/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_calls_array/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_calls_array/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_calls_array/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_calls_array/target/brillig_calls_array.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_calls_array/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_calls_conditionals/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_calls_conditionals/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_calls_conditionals/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_calls_conditionals/target/brillig_calls_conditionals.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_calls_conditionals/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_cast/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/brillig_integer_binary_operations => execution_success/brillig_cast}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_cast/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_cast/target/brillig_cast.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_cast/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_conditional/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/custom_entry => execution_success/brillig_conditional}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_conditional/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_conditional/target/brillig_conditional.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_conditional/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_ecdsa/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_ecdsa/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_ecdsa/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_ecdsa/target/brillig_ecdsa.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_ecdsa/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_field_binary_operations/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/brillig_modulo => execution_success/brillig_field_binary_operations}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_field_binary_operations/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_field_binary_operations/target/brillig_field_binary_operations.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_field_binary_operations/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_fns_as_values/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_fns_as_values/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_fns_as_values/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_fns_as_values/target/brillig_fns_as_values.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_fns_as_values/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_hash_to_field/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_hash_to_field/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_hash_to_field/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_hash_to_field/target/brillig_hash_to_field.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_hash_to_field/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_identity_function/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_identity_function/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_identity_function/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_identity_function/target/brillig_identity_function.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_identity_function/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_integer_binary_operations/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/higher_order_functions => execution_success/brillig_integer_binary_operations}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_integer_binary_operations/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_integer_binary_operations/target/brillig_integer_binary_operations.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_integer_binary_operations/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_keccak/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_keccak/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_keccak/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_keccak/target/brillig_keccak.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_keccak/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_loop/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_loop/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_loop/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_loop/target/brillig_loop.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_loop/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_modulo/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/let_stmt => execution_success/brillig_modulo}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_modulo/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_modulo/target/brillig_modulo.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_modulo/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_nested_arrays/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_nested_arrays/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_nested_arrays/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_nested_arrays/target/brillig_nested_arrays.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_nested_arrays/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_not/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace => execution_success/brillig_not}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_not/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_not/target/brillig_not.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_not/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_oracle/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_oracle/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_oracle/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_oracle/target/brillig_oracle.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_oracle/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_pedersen/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_pedersen/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_pedersen/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_pedersen/target/brillig_pedersen.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_pedersen/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_recursion/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_recursion/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_recursion/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_recursion/target/brillig_recursion.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_recursion/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_references/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_references/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_references/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_references/target/brillig_references.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_references/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_scalar_mul/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_scalar_mul/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_scalar_mul/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_scalar_mul/target/brillig_scalar_mul.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_scalar_mul/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_schnorr/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_schnorr/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_schnorr/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_schnorr/target/brillig_schnorr.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_schnorr/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_sha256/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_sha256/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_sha256/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_sha256/target/brillig_sha256.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_sha256/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_slices/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_slices/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_slices/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_slices/target/brillig_slices.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_slices/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_be_bytes/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_be_bytes/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_be_bytes/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_be_bytes/target/brillig_to_be_bytes.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_be_bytes/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_bits/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_bits/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_bits/target/brillig_to_bits.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_bits/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_bytes_integration/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_bytes_integration/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_bytes_integration/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_bytes_integration/target/brillig_to_bytes_integration.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_bytes_integration/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_le_bytes/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_le_bytes/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_le_bytes/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_le_bytes/target/brillig_to_le_bytes.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_to_le_bytes/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_top_level/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_top_level/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_top_level/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_top_level/target/brillig_top_level.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/brillig_top_level/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/cast_bool/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/cast_bool/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/cast_bool/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/cast_bool/target/cast_bool.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/cast_bool/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/closures_mut_ref/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/closures_mut_ref/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/closures_mut_ref/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/closures_mut_ref/target/closures_mut_ref.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/closures_mut_ref/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/comptime_array_access/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/comptime_array_access/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/comptime_array_access/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/comptime_array_access/target/comptime_array_access.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/comptime_array_access/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/comptime_recursion_regression/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/comptime_recursion_regression/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/comptime_recursion_regression/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/comptime_recursion_regression/target/comptime_recursion_regression.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/comptime_recursion_regression/target/witness.tr (100%) create mode 100644 crates/nargo_cli/tests/execution_success/config.toml rename crates/nargo_cli/tests/{test_data => execution_success}/constant_return/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/constant_return/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/constant_return/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/constant_return/target/constant_return.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/constant_return/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/contracts/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/contracts/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/contracts/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/contracts/target/contracts.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/contracts/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/custom_entry/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/custom_entry_not_found => execution_success/custom_entry}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/custom_entry/src/foobarbaz.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/custom_entry/target/custom_entry.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/custom_entry/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/debug_logs/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/debug_logs/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/debug_logs/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/debug_logs/target/debug_logs.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/debug_logs/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/diamond_deps_0/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/diamond_deps_0/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/diamond_deps_0/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/diamond_deps_0/target/diamond_deps_0.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/diamond_deps_0/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/distinct_keyword/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/distinct_keyword/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/distinct_keyword/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/distinct_keyword/target/distinct_keyword.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/distinct_keyword/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/ecdsa_secp256k1/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/ecdsa_secp256k1/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/ecdsa_secp256k1/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/ecdsa_secp256k1/target/ecdsa_secp256k1.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/ecdsa_secp256k1/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/ecdsa_secp256r1/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/ecdsa_secp256r1/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/ecdsa_secp256r1/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/ecdsa_secp256r1/target/ecdsa_secp256r1.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/ecdsa_secp256r1/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/generics/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/generics/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/generics/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/generics/target/generics.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/generics/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/global_consts/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/global_consts/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/global_consts/src/baz.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/global_consts/src/foo.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/global_consts/src/foo/bar.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/global_consts/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/global_consts/target/global_consts.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/global_consts/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/hash_to_field/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/hash_to_field/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/hash_to_field/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/hash_to_field/target/hash_to_field.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/hash_to_field/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/higher_order_functions/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/numeric_generics => execution_success/higher_order_functions}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/higher_order_functions/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/higher_order_functions/target/higher_order_functions.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/higher_order_functions/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/if_else_chain/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/if_else_chain/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/if_else_chain/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/if_else_chain/target/if_else_chain.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/if_else_chain/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/integer_array_indexing/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/integer_array_indexing/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/integer_array_indexing/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/integer_array_indexing/target/integer_array_indexing.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/integer_array_indexing/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/keccak256/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/keccak256/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/keccak256/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/keccak256/target/keccak256.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/keccak256/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/main_bool_arg/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/main_bool_arg/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/main_bool_arg/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/main_bool_arg/target/main_bool_arg.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/main_bool_arg/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/main_return/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/main_return/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/main_return/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/main_return/target/main_return.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/main_return/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/merkle_insert/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/merkle_insert/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/merkle_insert/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/merkle_insert/target/merkle_insert.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/merkle_insert/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modules/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modules/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modules/src/foo.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modules/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modules/target/modules.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modules/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modules_more/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modules_more/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modules_more/src/foo.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modules_more/src/foo/bar.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modules_more/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modules_more/target/modules_more.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modules_more/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modulus/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modulus/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modulus/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modulus/target/modulus.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/modulus/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/nested_arrays_from_brillig/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/nested_arrays_from_brillig/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/nested_arrays_from_brillig/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/nested_arrays_from_brillig/target/nested_arrays_from_brillig.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/nested_arrays_from_brillig/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/pedersen_check/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/pedersen_check/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/pedersen_check/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/pedersen_check/target/pedersen_check.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/pedersen_check/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/poseidon_bn254_hash/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/poseidon_bn254_hash/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/poseidon_bn254_hash/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/poseidon_bn254_hash/target/poseidon_bn254_hash.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/poseidon_bn254_hash/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/poseidonsponge_x5_254/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/poseidonsponge_x5_254/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/poseidonsponge_x5_254/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/poseidonsponge_x5_254/target/poseidonsponge_x5_254.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/poseidonsponge_x5_254/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/pred_eq/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace/crates/a => execution_success/pred_eq}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/pred_eq/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/pred_eq/target/pred_eq.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/pred_eq/target/witness.tr (100%) create mode 100755 crates/nargo_cli/tests/execution_success/rebuild.sh rename crates/nargo_cli/tests/{test_data => execution_success}/references/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/references/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/references/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/references/target/references.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/references/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/regression/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/regression/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/regression/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/regression/target/regression.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/regression/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/regression_2099/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/regression_2099/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/regression_2099/target/regression_2099.json (100%) rename crates/nargo_cli/tests/{test_data/ec_baby_jubjub => execution_success/regression_2099}/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/regression_method_cannot_be_found/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/regression_method_cannot_be_found/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/regression_method_cannot_be_found/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/regression_method_cannot_be_found/target/regression_method_cannot_be_found.json (100%) rename crates/nargo_cli/tests/{test_data/higher_order_fn_selector => execution_success/regression_method_cannot_be_found}/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/ret_fn_ret_cl/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/ret_fn_ret_cl/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/ret_fn_ret_cl/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/ret_fn_ret_cl/target/ret_fn_ret_cl.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/ret_fn_ret_cl/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/scalar_mul/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/scalar_mul/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/scalar_mul/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/scalar_mul/target/scalar_mul.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/scalar_mul/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/schnorr/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/schnorr/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/schnorr/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/schnorr/target/schnorr.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/schnorr/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/sha256/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/sha256/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/sha256/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/sha256/target/sha256.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/sha256/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/sha2_blocks/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/sha2_blocks/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/sha2_blocks/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/sha2_blocks/target/sha2_blocks.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/sha2_blocks/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/sha2_byte/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/sha2_byte/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/sha2_byte/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/sha2_byte/target/sha2_byte.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/sha2_byte/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/signed_division/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/signed_division/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/signed_division/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/signed_division/target/signed_division.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/signed_division/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_add_and_ret_arr/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_add_and_ret_arr/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_add_and_ret_arr/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_add_and_ret_arr/target/simple_add_and_ret_arr.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_add_and_ret_arr/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_array_param/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_array_param/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_array_param/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_array_param/target/simple_array_param.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_array_param/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_bitwise/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_bitwise/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_bitwise/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_bitwise/target/simple_bitwise.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_bitwise/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_comparison/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_comparison/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_comparison/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_comparison/target/simple_comparison.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_comparison/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_mut/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_mut/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_mut/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_mut/target/simple_mut.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_mut/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_not/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_not/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_not/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_not/target/simple_not.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_not/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_print/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_print/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_print/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_print/target/simple_print.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_print/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_program_addition/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_program_addition/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_program_addition/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_program_addition/target/simple_program_addition.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_program_addition/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_program_no_body/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_program_no_body/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_program_no_body/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_program_no_body/target/simple_program_no_body.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_program_no_body/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_radix/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_radix/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_radix/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_radix/target/simple_radix.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_radix/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_range/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_range/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_range/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_range/target/simple_range.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_range/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_shield/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_shield/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_shield/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_shield/target/simple_shield.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_shield/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_shift_left_right/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_shift_left_right/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_shift_left_right/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_shift_left_right/target/simple_shift_left_right.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/simple_shift_left_right/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/slices/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/slices/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/slices/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/slices/target/slices.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/slices/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/strings/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/strings/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/strings/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/strings/target/strings.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/strings/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct/target/struct.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct_array_inputs/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct_array_inputs/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct_array_inputs/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct_array_inputs/target/struct_array_inputs.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct_array_inputs/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct_fields_ordering/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct_fields_ordering/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct_fields_ordering/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct_fields_ordering/target/struct_fields_ordering.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct_fields_ordering/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct_inputs/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct_inputs/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct_inputs/src/foo.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct_inputs/src/foo/bar.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct_inputs/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct_inputs/target/struct_inputs.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/struct_inputs/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/submodules/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/submodules/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/submodules/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/submodules/target/submodules.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/submodules/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/to_be_bytes/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/to_be_bytes/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/to_be_bytes/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/to_be_bytes/target/to_be_bytes.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/to_be_bytes/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/to_bytes_integration/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/to_bytes_integration/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/to_bytes_integration/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/to_bytes_integration/target/to_bytes_integration.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/to_bytes_integration/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/to_le_bytes/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/to_le_bytes/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/to_le_bytes/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/to_le_bytes/target/to_le_bytes.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/to_le_bytes/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/tuples/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace/crates/b => execution_success/tuples}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/tuples/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/tuples/target/tuples.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/tuples/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/type_aliases/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/type_aliases/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/type_aliases/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/type_aliases/target/type_aliases.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/type_aliases/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/unconstrained_empty/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/unconstrained_empty/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/unconstrained_empty/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/unconstrained_empty/target/unconstrained_empty.json (100%) rename crates/nargo_cli/tests/{test_data/inner_outer_cl => execution_success/unconstrained_empty}/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/vectors/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/vectors/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/vectors/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/vectors/target/vectors.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/vectors/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data/workspace_missing_toml => execution_success/workspace}/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace_fail/crates/b => execution_success/workspace}/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace_default_member => execution_success/workspace/crates}/a/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace_default_member => execution_success/workspace/crates}/a/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace_fail => execution_success/workspace}/crates/a/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data/workspace_fail => execution_success/workspace}/crates/b/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace_missing_toml => execution_success/workspace}/crates/b/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace_fail => execution_success/workspace}/crates/b/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/workspace_default_member/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/workspace_default_member/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace_fail/crates => execution_success/workspace_default_member}/a/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace_missing_toml/crates => execution_success/workspace_default_member}/a/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace_missing_toml/crates => execution_success/workspace_default_member}/a/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data/workspace_missing_toml/crates => execution_success/workspace_default_member}/b/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/workspace_default_member/b/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data/workspace_missing_toml/crates => execution_success/workspace_default_member}/b/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/workspace_default_member/target/a.json (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/workspace_default_member/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/xor/Nargo.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/xor/Prover.toml (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/xor/src/main.nr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/xor/target/witness.tr (100%) rename crates/nargo_cli/tests/{test_data => execution_success}/xor/target/xor.json (100%) create mode 120000 crates/nargo_cli/tests/test_data delete mode 100644 crates/nargo_cli/tests/test_data/array_dynamic/target/array_dynamic.json delete mode 100644 crates/nargo_cli/tests/test_data/array_dynamic/target/witness.tr delete mode 100644 crates/nargo_cli/tests/test_data/config.toml delete mode 100644 crates/nargo_cli/tests/test_data/ec_baby_jubjub/target/ec_baby_jubjub.json delete mode 100644 crates/nargo_cli/tests/test_data/higher_order_fn_selector/target/higher_order_fn_selector.json delete mode 100644 crates/nargo_cli/tests/test_data/inner_outer_cl/target/inner_outer_cl.json delete mode 100644 crates/nargo_cli/tests/test_data/let_stmt/target/let_stmt.json delete mode 100644 crates/nargo_cli/tests/test_data/let_stmt/target/witness.tr delete mode 100644 crates/nargo_cli/tests/test_data/numeric_generics/target/numeric_generics.json delete mode 100644 crates/nargo_cli/tests/test_data/numeric_generics/target/witness.tr delete mode 100644 crates/nargo_cli/tests/test_data/option/target/option.json delete mode 100644 crates/nargo_cli/tests/test_data/option/target/witness.tr delete mode 100755 crates/nargo_cli/tests/test_data/rebuild.sh delete mode 100644 crates/nargo_cli/tests/test_data/regression_2099/target/witness.tr delete mode 100644 crates/nargo_cli/tests/test_data/regression_method_cannot_be_found/target/witness.tr delete mode 100644 crates/nargo_cli/tests/test_data/to_bits/target/to_bits.json delete mode 100644 crates/nargo_cli/tests/test_data/to_bits/target/witness.tr delete mode 100644 crates/nargo_cli/tests/test_data/unconstrained_empty/target/witness.tr delete mode 100644 crates/nargo_cli/tests/test_data/unit/target/unit.json delete mode 100644 crates/nargo_cli/tests/test_data/unit/target/witness.tr diff --git a/.gitignore b/.gitignore index 8aec0edeadc..39f4fbe1266 100644 --- a/.gitignore +++ b/.gitignore @@ -20,5 +20,5 @@ result *.vk **/Verifier.toml **/target -!crates/nargo_cli/tests/test_data/*/target -!crates/nargo_cli/tests/test_data/*/target/witness.tr +!crates/nargo_cli/tests/execution_success/*/target +!crates/nargo_cli/tests/execution_success/*/target/witness.tr diff --git a/crates/nargo_cli/build.rs b/crates/nargo_cli/build.rs index f3493148a7f..6d8dae136e2 100644 --- a/crates/nargo_cli/build.rs +++ b/crates/nargo_cli/build.rs @@ -1,5 +1,4 @@ use rustc_version::{version, Version}; -use std::collections::BTreeMap; use std::fs::File; use std::io::Write; use std::path::{Path, PathBuf}; @@ -32,43 +31,25 @@ fn main() { let destination = Path::new(&out_dir).join("execute.rs"); let mut test_file = File::create(destination).unwrap(); - generate_tests(&mut test_file); -} - -fn load_conf(conf_path: &Path) -> BTreeMap> { - let config_str = std::fs::read_to_string(conf_path).unwrap(); - - let mut conf_data = match toml::from_str(&config_str) { - Ok(t) => t, - Err(_) => { - BTreeMap::from([("exclude".to_string(), Vec::new()), ("fail".to_string(), Vec::new())]) - } - }; - if conf_data.get("exclude").is_none() { - conf_data.insert("exclude".to_string(), Vec::new()); - } - if conf_data.get("fail").is_none() { - conf_data.insert("fail".to_string(), Vec::new()); - } - conf_data -} - -fn generate_tests(test_file: &mut File) { // Try to find the directory that Cargo sets when it is running; otherwise fallback to assuming the CWD // is the root of the repository and append the crate path let manifest_dir = match std::env::var("CARGO_MANIFEST_DIR") { Ok(dir) => PathBuf::from(dir), Err(_) => std::env::current_dir().unwrap().join("crates").join("nargo_cli"), }; - let test_sub_dir = "test_data"; - let test_data_dir = manifest_dir.join("tests").join(test_sub_dir); - let config_path = test_data_dir.join("config.toml"); + let test_dir = manifest_dir.join("tests"); + + generate_execution_success_tests(&mut test_file, &test_dir); + generate_compile_success_tests(&mut test_file, &test_dir); + generate_compile_failure_tests(&mut test_file, &test_dir); +} - // Load config.toml file from `test_data` directory - let config_data: BTreeMap> = load_conf(&config_path); +fn generate_execution_success_tests(test_file: &mut File, test_data_dir: &Path) { + let test_sub_dir = "execution_success"; + let test_data_dir = test_data_dir.join(test_sub_dir); let test_case_dirs = - fs::read_dir(&test_data_dir).unwrap().flatten().filter(|c| c.path().is_dir()); + fs::read_dir(test_data_dir).unwrap().flatten().filter(|c| c.path().is_dir()); for test_dir in test_case_dirs { let test_name = @@ -80,28 +61,93 @@ fn generate_tests(test_file: &mut File) { }; let test_dir = &test_dir.path(); - let exclude_macro = - if config_data["exclude"].contains(&test_name) { "#[ignore]" } else { "" }; + write!( + test_file, + r#" +#[test] +fn execution_success_{test_name}() {{ + let test_program_dir = PathBuf::from("{test_dir}"); - let should_fail = config_data["fail"].contains(&test_name); + let mut cmd = Command::cargo_bin("nargo").unwrap(); + cmd.arg("--program-dir").arg(test_program_dir); + cmd.arg("execute"); + + cmd.assert().success(); +}} + "#, + test_dir = test_dir.display(), + ) + .expect("Could not write templated test file."); + } +} + +fn generate_compile_success_tests(test_file: &mut File, test_data_dir: &Path) { + let test_sub_dir = "compile_success"; + let test_data_dir = test_data_dir.join(test_sub_dir); + + let test_case_dirs = + fs::read_dir(test_data_dir).unwrap().flatten().filter(|c| c.path().is_dir()); + + for test_dir in test_case_dirs { + let test_name = + test_dir.file_name().into_string().expect("Directory can't be converted to string"); + if test_name.contains('-') { + panic!( + "Invalid test directory: {test_name}. Cannot include `-`, please convert to `_`" + ); + }; + let test_dir = &test_dir.path(); + + write!( + test_file, + r#" +#[test] +fn compile_success_{test_name}() {{ + let test_program_dir = PathBuf::from("{test_dir}"); + + let mut cmd = Command::cargo_bin("nargo").unwrap(); + cmd.arg("--program-dir").arg(test_program_dir); + cmd.arg("info"); + + // `compile_success` tests should be able to compile down to an empty circuit. + cmd.assert().stdout(predicate::str::contains("Total ACIR opcodes generated for language PLONKCSat {{ width: 3 }}: 0")); +}} + "#, + test_dir = test_dir.display(), + ) + .expect("Could not write templated test file."); + } +} + +fn generate_compile_failure_tests(test_file: &mut File, test_data_dir: &Path) { + let test_sub_dir = "compile_failure"; + let test_data_dir = test_data_dir.join(test_sub_dir); + + let test_case_dirs = + fs::read_dir(test_data_dir).unwrap().flatten().filter(|c| c.path().is_dir()); + + for test_dir in test_case_dirs { + let test_name = + test_dir.file_name().into_string().expect("Directory can't be converted to string"); + if test_name.contains('-') { + panic!( + "Invalid test directory: {test_name}. Cannot include `-`, please convert to `_`" + ); + }; + let test_dir = &test_dir.path(); write!( test_file, r#" -{exclude_macro} #[test] -fn execute_{test_sub_dir}_{test_name}() {{ +fn compile_failure_{test_name}() {{ let test_program_dir = PathBuf::from("{test_dir}"); let mut cmd = Command::cargo_bin("nargo").unwrap(); cmd.arg("--program-dir").arg(test_program_dir); cmd.arg("execute"); - if {should_fail} {{ - cmd.assert().failure(); - }} else {{ - cmd.assert().success(); - }} + cmd.assert().failure(); }} "#, test_dir = test_dir.display(), diff --git a/crates/nargo_cli/tests/test_data/brillig_assert_fail/Nargo.toml b/crates/nargo_cli/tests/compile_failure/brillig_assert_fail/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_assert_fail/Nargo.toml rename to crates/nargo_cli/tests/compile_failure/brillig_assert_fail/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_acir_as_brillig/Prover.toml b/crates/nargo_cli/tests/compile_failure/brillig_assert_fail/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_acir_as_brillig/Prover.toml rename to crates/nargo_cli/tests/compile_failure/brillig_assert_fail/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_assert/src/main.nr b/crates/nargo_cli/tests/compile_failure/brillig_assert_fail/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_assert/src/main.nr rename to crates/nargo_cli/tests/compile_failure/brillig_assert_fail/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/custom_entry_not_found/Nargo.toml b/crates/nargo_cli/tests/compile_failure/custom_entry_not_found/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/custom_entry_not_found/Nargo.toml rename to crates/nargo_cli/tests/compile_failure/custom_entry_not_found/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/assert/Prover.toml b/crates/nargo_cli/tests/compile_failure/custom_entry_not_found/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/assert/Prover.toml rename to crates/nargo_cli/tests/compile_failure/custom_entry_not_found/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/assert/src/main.nr b/crates/nargo_cli/tests/compile_failure/custom_entry_not_found/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/assert/src/main.nr rename to crates/nargo_cli/tests/compile_failure/custom_entry_not_found/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/dep_impl_primitive/Nargo.toml b/crates/nargo_cli/tests/compile_failure/dep_impl_primitive/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/dep_impl_primitive/Nargo.toml rename to crates/nargo_cli/tests/compile_failure/dep_impl_primitive/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/dep_impl_primitive/Prover.toml b/crates/nargo_cli/tests/compile_failure/dep_impl_primitive/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/dep_impl_primitive/Prover.toml rename to crates/nargo_cli/tests/compile_failure/dep_impl_primitive/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/dep_impl_primitive/src/main.nr b/crates/nargo_cli/tests/compile_failure/dep_impl_primitive/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/dep_impl_primitive/src/main.nr rename to crates/nargo_cli/tests/compile_failure/dep_impl_primitive/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/depend_on_bin/Nargo.toml b/crates/nargo_cli/tests/compile_failure/depend_on_bin/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/depend_on_bin/Nargo.toml rename to crates/nargo_cli/tests/compile_failure/depend_on_bin/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/depend_on_bin/Prover.toml b/crates/nargo_cli/tests/compile_failure/depend_on_bin/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/depend_on_bin/Prover.toml rename to crates/nargo_cli/tests/compile_failure/depend_on_bin/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/depend_on_bin/src/main.nr b/crates/nargo_cli/tests/compile_failure/depend_on_bin/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/depend_on_bin/src/main.nr rename to crates/nargo_cli/tests/compile_failure/depend_on_bin/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/workspace/Nargo.toml b/crates/nargo_cli/tests/compile_failure/workspace_fail/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace/Nargo.toml rename to crates/nargo_cli/tests/compile_failure/workspace_fail/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/workspace/crates/a/Nargo.toml b/crates/nargo_cli/tests/compile_failure/workspace_fail/crates/a/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace/crates/a/Nargo.toml rename to crates/nargo_cli/tests/compile_failure/workspace_fail/crates/a/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/workspace_fail/crates/a/Prover.toml b/crates/nargo_cli/tests/compile_failure/workspace_fail/crates/a/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_fail/crates/a/Prover.toml rename to crates/nargo_cli/tests/compile_failure/workspace_fail/crates/a/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/workspace/crates/a/src/main.nr b/crates/nargo_cli/tests/compile_failure/workspace_fail/crates/a/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace/crates/a/src/main.nr rename to crates/nargo_cli/tests/compile_failure/workspace_fail/crates/a/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/workspace/crates/b/Nargo.toml b/crates/nargo_cli/tests/compile_failure/workspace_fail/crates/b/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace/crates/b/Nargo.toml rename to crates/nargo_cli/tests/compile_failure/workspace_fail/crates/b/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/bool_or/Prover.toml b/crates/nargo_cli/tests/compile_failure/workspace_fail/crates/b/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/bool_or/Prover.toml rename to crates/nargo_cli/tests/compile_failure/workspace_fail/crates/b/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/workspace/crates/b/src/main.nr b/crates/nargo_cli/tests/compile_failure/workspace_fail/crates/b/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace/crates/b/src/main.nr rename to crates/nargo_cli/tests/compile_failure/workspace_fail/crates/b/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/workspace_fail/Nargo.toml b/crates/nargo_cli/tests/compile_failure/workspace_missing_toml/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_fail/Nargo.toml rename to crates/nargo_cli/tests/compile_failure/workspace_missing_toml/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/pred_eq/Prover.toml b/crates/nargo_cli/tests/compile_failure/workspace_missing_toml/crates/a/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/pred_eq/Prover.toml rename to crates/nargo_cli/tests/compile_failure/workspace_missing_toml/crates/a/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/workspace_default_member/a/src/main.nr b/crates/nargo_cli/tests/compile_failure/workspace_missing_toml/crates/a/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_default_member/a/src/main.nr rename to crates/nargo_cli/tests/compile_failure/workspace_missing_toml/crates/a/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/workspace_default_member/b/Nargo.toml b/crates/nargo_cli/tests/compile_failure/workspace_missing_toml/crates/b/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_default_member/b/Nargo.toml rename to crates/nargo_cli/tests/compile_failure/workspace_missing_toml/crates/b/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_not/Prover.toml b/crates/nargo_cli/tests/compile_failure/workspace_missing_toml/crates/b/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_not/Prover.toml rename to crates/nargo_cli/tests/compile_failure/workspace_missing_toml/crates/b/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/workspace_default_member/b/src/main.nr b/crates/nargo_cli/tests/compile_failure/workspace_missing_toml/crates/b/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_default_member/b/src/main.nr rename to crates/nargo_cli/tests/compile_failure/workspace_missing_toml/crates/b/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/ec_baby_jubjub/Nargo.toml b/crates/nargo_cli/tests/compile_success/ec_baby_jubjub/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/ec_baby_jubjub/Nargo.toml rename to crates/nargo_cli/tests/compile_success/ec_baby_jubjub/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/ec_baby_jubjub/src/main.nr b/crates/nargo_cli/tests/compile_success/ec_baby_jubjub/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/ec_baby_jubjub/src/main.nr rename to crates/nargo_cli/tests/compile_success/ec_baby_jubjub/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/higher_order_fn_selector/Nargo.toml b/crates/nargo_cli/tests/compile_success/higher_order_fn_selector/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/higher_order_fn_selector/Nargo.toml rename to crates/nargo_cli/tests/compile_success/higher_order_fn_selector/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/higher_order_fn_selector/src/main.nr b/crates/nargo_cli/tests/compile_success/higher_order_fn_selector/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/higher_order_fn_selector/src/main.nr rename to crates/nargo_cli/tests/compile_success/higher_order_fn_selector/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/inner_outer_cl/Nargo.toml b/crates/nargo_cli/tests/compile_success/inner_outer_cl/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/inner_outer_cl/Nargo.toml rename to crates/nargo_cli/tests/compile_success/inner_outer_cl/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/inner_outer_cl/src/main.nr b/crates/nargo_cli/tests/compile_success/inner_outer_cl/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/inner_outer_cl/src/main.nr rename to crates/nargo_cli/tests/compile_success/inner_outer_cl/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/let_stmt/Nargo.toml b/crates/nargo_cli/tests/compile_success/let_stmt/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/let_stmt/Nargo.toml rename to crates/nargo_cli/tests/compile_success/let_stmt/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_cast/Prover.toml b/crates/nargo_cli/tests/compile_success/let_stmt/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_cast/Prover.toml rename to crates/nargo_cli/tests/compile_success/let_stmt/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/let_stmt/src/main.nr b/crates/nargo_cli/tests/compile_success/let_stmt/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/let_stmt/src/main.nr rename to crates/nargo_cli/tests/compile_success/let_stmt/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/numeric_generics/Nargo.toml b/crates/nargo_cli/tests/compile_success/numeric_generics/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/numeric_generics/Nargo.toml rename to crates/nargo_cli/tests/compile_success/numeric_generics/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_field_binary_operations/Prover.toml b/crates/nargo_cli/tests/compile_success/numeric_generics/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_field_binary_operations/Prover.toml rename to crates/nargo_cli/tests/compile_success/numeric_generics/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/numeric_generics/src/main.nr b/crates/nargo_cli/tests/compile_success/numeric_generics/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/numeric_generics/src/main.nr rename to crates/nargo_cli/tests/compile_success/numeric_generics/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/option/Nargo.toml b/crates/nargo_cli/tests/compile_success/option/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/option/Nargo.toml rename to crates/nargo_cli/tests/compile_success/option/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/option/src/main.nr b/crates/nargo_cli/tests/compile_success/option/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/option/src/main.nr rename to crates/nargo_cli/tests/compile_success/option/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/to_bits/Nargo.toml b/crates/nargo_cli/tests/compile_success/to_bits/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/to_bits/Nargo.toml rename to crates/nargo_cli/tests/compile_success/to_bits/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/to_bits/src/main.nr b/crates/nargo_cli/tests/compile_success/to_bits/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/to_bits/src/main.nr rename to crates/nargo_cli/tests/compile_success/to_bits/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/unit/Nargo.toml b/crates/nargo_cli/tests/compile_success/unit/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/unit/Nargo.toml rename to crates/nargo_cli/tests/compile_success/unit/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/unit/src/main.nr b/crates/nargo_cli/tests/compile_success/unit/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/unit/src/main.nr rename to crates/nargo_cli/tests/compile_success/unit/src/main.nr diff --git a/crates/nargo_cli/tests/execute.rs b/crates/nargo_cli/tests/execute.rs index f0ada378698..e53ad068c01 100644 --- a/crates/nargo_cli/tests/execute.rs +++ b/crates/nargo_cli/tests/execute.rs @@ -3,6 +3,7 @@ mod tests { // Some of these imports are consumed by the injected tests use assert_cmd::prelude::*; + use predicates::prelude::*; use tempdir::TempDir; use std::collections::BTreeMap; diff --git a/crates/nargo_cli/tests/test_data/1327_concrete_in_generic/Nargo.toml b/crates/nargo_cli/tests/execution_success/1327_concrete_in_generic/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/1327_concrete_in_generic/Nargo.toml rename to crates/nargo_cli/tests/execution_success/1327_concrete_in_generic/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/1327_concrete_in_generic/Prover.toml b/crates/nargo_cli/tests/execution_success/1327_concrete_in_generic/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/1327_concrete_in_generic/Prover.toml rename to crates/nargo_cli/tests/execution_success/1327_concrete_in_generic/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/1327_concrete_in_generic/src/main.nr b/crates/nargo_cli/tests/execution_success/1327_concrete_in_generic/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/1327_concrete_in_generic/src/main.nr rename to crates/nargo_cli/tests/execution_success/1327_concrete_in_generic/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/1327_concrete_in_generic/target/1327_concrete_in_generic.json b/crates/nargo_cli/tests/execution_success/1327_concrete_in_generic/target/1327_concrete_in_generic.json similarity index 100% rename from crates/nargo_cli/tests/test_data/1327_concrete_in_generic/target/1327_concrete_in_generic.json rename to crates/nargo_cli/tests/execution_success/1327_concrete_in_generic/target/1327_concrete_in_generic.json diff --git a/crates/nargo_cli/tests/test_data/1327_concrete_in_generic/target/witness.tr b/crates/nargo_cli/tests/execution_success/1327_concrete_in_generic/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/1327_concrete_in_generic/target/witness.tr rename to crates/nargo_cli/tests/execution_success/1327_concrete_in_generic/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/1_mul/Nargo.toml b/crates/nargo_cli/tests/execution_success/1_mul/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/1_mul/Nargo.toml rename to crates/nargo_cli/tests/execution_success/1_mul/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/1_mul/Prover.toml b/crates/nargo_cli/tests/execution_success/1_mul/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/1_mul/Prover.toml rename to crates/nargo_cli/tests/execution_success/1_mul/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/1_mul/src/main.nr b/crates/nargo_cli/tests/execution_success/1_mul/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/1_mul/src/main.nr rename to crates/nargo_cli/tests/execution_success/1_mul/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/1_mul/target/1_mul.json b/crates/nargo_cli/tests/execution_success/1_mul/target/1_mul.json similarity index 100% rename from crates/nargo_cli/tests/test_data/1_mul/target/1_mul.json rename to crates/nargo_cli/tests/execution_success/1_mul/target/1_mul.json diff --git a/crates/nargo_cli/tests/test_data/1_mul/target/witness.tr b/crates/nargo_cli/tests/execution_success/1_mul/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/1_mul/target/witness.tr rename to crates/nargo_cli/tests/execution_success/1_mul/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/2_div/Nargo.toml b/crates/nargo_cli/tests/execution_success/2_div/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/2_div/Nargo.toml rename to crates/nargo_cli/tests/execution_success/2_div/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/2_div/Prover.toml b/crates/nargo_cli/tests/execution_success/2_div/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/2_div/Prover.toml rename to crates/nargo_cli/tests/execution_success/2_div/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/2_div/src/main.nr b/crates/nargo_cli/tests/execution_success/2_div/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/2_div/src/main.nr rename to crates/nargo_cli/tests/execution_success/2_div/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/2_div/target/2_div.json b/crates/nargo_cli/tests/execution_success/2_div/target/2_div.json similarity index 100% rename from crates/nargo_cli/tests/test_data/2_div/target/2_div.json rename to crates/nargo_cli/tests/execution_success/2_div/target/2_div.json diff --git a/crates/nargo_cli/tests/test_data/2_div/target/witness.tr b/crates/nargo_cli/tests/execution_success/2_div/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/2_div/target/witness.tr rename to crates/nargo_cli/tests/execution_success/2_div/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/3_add/Nargo.toml b/crates/nargo_cli/tests/execution_success/3_add/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/3_add/Nargo.toml rename to crates/nargo_cli/tests/execution_success/3_add/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/3_add/Prover.toml b/crates/nargo_cli/tests/execution_success/3_add/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/3_add/Prover.toml rename to crates/nargo_cli/tests/execution_success/3_add/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/3_add/src/main.nr b/crates/nargo_cli/tests/execution_success/3_add/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/3_add/src/main.nr rename to crates/nargo_cli/tests/execution_success/3_add/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/3_add/target/3_add.json b/crates/nargo_cli/tests/execution_success/3_add/target/3_add.json similarity index 100% rename from crates/nargo_cli/tests/test_data/3_add/target/3_add.json rename to crates/nargo_cli/tests/execution_success/3_add/target/3_add.json diff --git a/crates/nargo_cli/tests/test_data/3_add/target/witness.tr b/crates/nargo_cli/tests/execution_success/3_add/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/3_add/target/witness.tr rename to crates/nargo_cli/tests/execution_success/3_add/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/4_sub/Nargo.toml b/crates/nargo_cli/tests/execution_success/4_sub/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/4_sub/Nargo.toml rename to crates/nargo_cli/tests/execution_success/4_sub/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/4_sub/Prover.toml b/crates/nargo_cli/tests/execution_success/4_sub/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/4_sub/Prover.toml rename to crates/nargo_cli/tests/execution_success/4_sub/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/4_sub/src/main.nr b/crates/nargo_cli/tests/execution_success/4_sub/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/4_sub/src/main.nr rename to crates/nargo_cli/tests/execution_success/4_sub/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/4_sub/target/4_sub.json b/crates/nargo_cli/tests/execution_success/4_sub/target/4_sub.json similarity index 100% rename from crates/nargo_cli/tests/test_data/4_sub/target/4_sub.json rename to crates/nargo_cli/tests/execution_success/4_sub/target/4_sub.json diff --git a/crates/nargo_cli/tests/test_data/4_sub/target/witness.tr b/crates/nargo_cli/tests/execution_success/4_sub/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/4_sub/target/witness.tr rename to crates/nargo_cli/tests/execution_success/4_sub/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/5_over/Nargo.toml b/crates/nargo_cli/tests/execution_success/5_over/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/5_over/Nargo.toml rename to crates/nargo_cli/tests/execution_success/5_over/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/5_over/Prover.toml b/crates/nargo_cli/tests/execution_success/5_over/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/5_over/Prover.toml rename to crates/nargo_cli/tests/execution_success/5_over/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/5_over/src/main.nr b/crates/nargo_cli/tests/execution_success/5_over/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/5_over/src/main.nr rename to crates/nargo_cli/tests/execution_success/5_over/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/5_over/target/5_over.json b/crates/nargo_cli/tests/execution_success/5_over/target/5_over.json similarity index 100% rename from crates/nargo_cli/tests/test_data/5_over/target/5_over.json rename to crates/nargo_cli/tests/execution_success/5_over/target/5_over.json diff --git a/crates/nargo_cli/tests/test_data/5_over/target/witness.tr b/crates/nargo_cli/tests/execution_success/5_over/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/5_over/target/witness.tr rename to crates/nargo_cli/tests/execution_success/5_over/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/6/Nargo.toml b/crates/nargo_cli/tests/execution_success/6/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/6/Nargo.toml rename to crates/nargo_cli/tests/execution_success/6/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/6/Prover.toml b/crates/nargo_cli/tests/execution_success/6/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/6/Prover.toml rename to crates/nargo_cli/tests/execution_success/6/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/6/src/main.nr b/crates/nargo_cli/tests/execution_success/6/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/6/src/main.nr rename to crates/nargo_cli/tests/execution_success/6/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/6/target/6.json b/crates/nargo_cli/tests/execution_success/6/target/6.json similarity index 100% rename from crates/nargo_cli/tests/test_data/6/target/6.json rename to crates/nargo_cli/tests/execution_success/6/target/6.json diff --git a/crates/nargo_cli/tests/test_data/6/target/witness.tr b/crates/nargo_cli/tests/execution_success/6/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/6/target/witness.tr rename to crates/nargo_cli/tests/execution_success/6/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/6_array/Nargo.toml b/crates/nargo_cli/tests/execution_success/6_array/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/6_array/Nargo.toml rename to crates/nargo_cli/tests/execution_success/6_array/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/6_array/Prover.toml b/crates/nargo_cli/tests/execution_success/6_array/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/6_array/Prover.toml rename to crates/nargo_cli/tests/execution_success/6_array/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/6_array/src/main.nr b/crates/nargo_cli/tests/execution_success/6_array/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/6_array/src/main.nr rename to crates/nargo_cli/tests/execution_success/6_array/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/6_array/target/6_array.json b/crates/nargo_cli/tests/execution_success/6_array/target/6_array.json similarity index 100% rename from crates/nargo_cli/tests/test_data/6_array/target/6_array.json rename to crates/nargo_cli/tests/execution_success/6_array/target/6_array.json diff --git a/crates/nargo_cli/tests/test_data/6_array/target/witness.tr b/crates/nargo_cli/tests/execution_success/6_array/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/6_array/target/witness.tr rename to crates/nargo_cli/tests/execution_success/6_array/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/7/Nargo.toml b/crates/nargo_cli/tests/execution_success/7/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/7/Nargo.toml rename to crates/nargo_cli/tests/execution_success/7/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/7/Prover.toml b/crates/nargo_cli/tests/execution_success/7/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/7/Prover.toml rename to crates/nargo_cli/tests/execution_success/7/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/7/src/main.nr b/crates/nargo_cli/tests/execution_success/7/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/7/src/main.nr rename to crates/nargo_cli/tests/execution_success/7/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/7/target/7.json b/crates/nargo_cli/tests/execution_success/7/target/7.json similarity index 100% rename from crates/nargo_cli/tests/test_data/7/target/7.json rename to crates/nargo_cli/tests/execution_success/7/target/7.json diff --git a/crates/nargo_cli/tests/test_data/7/target/witness.tr b/crates/nargo_cli/tests/execution_success/7/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/7/target/witness.tr rename to crates/nargo_cli/tests/execution_success/7/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/7_function/Nargo.toml b/crates/nargo_cli/tests/execution_success/7_function/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/7_function/Nargo.toml rename to crates/nargo_cli/tests/execution_success/7_function/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/7_function/Prover.toml b/crates/nargo_cli/tests/execution_success/7_function/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/7_function/Prover.toml rename to crates/nargo_cli/tests/execution_success/7_function/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/7_function/src/main.nr b/crates/nargo_cli/tests/execution_success/7_function/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/7_function/src/main.nr rename to crates/nargo_cli/tests/execution_success/7_function/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/7_function/target/7_function.json b/crates/nargo_cli/tests/execution_success/7_function/target/7_function.json similarity index 100% rename from crates/nargo_cli/tests/test_data/7_function/target/7_function.json rename to crates/nargo_cli/tests/execution_success/7_function/target/7_function.json diff --git a/crates/nargo_cli/tests/test_data/7_function/target/witness.tr b/crates/nargo_cli/tests/execution_success/7_function/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/7_function/target/witness.tr rename to crates/nargo_cli/tests/execution_success/7_function/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/8_integration/Nargo.toml b/crates/nargo_cli/tests/execution_success/8_integration/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/8_integration/Nargo.toml rename to crates/nargo_cli/tests/execution_success/8_integration/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/8_integration/Prover.toml b/crates/nargo_cli/tests/execution_success/8_integration/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/8_integration/Prover.toml rename to crates/nargo_cli/tests/execution_success/8_integration/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/8_integration/src/main.nr b/crates/nargo_cli/tests/execution_success/8_integration/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/8_integration/src/main.nr rename to crates/nargo_cli/tests/execution_success/8_integration/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/8_integration/target/8_integration.json b/crates/nargo_cli/tests/execution_success/8_integration/target/8_integration.json similarity index 100% rename from crates/nargo_cli/tests/test_data/8_integration/target/8_integration.json rename to crates/nargo_cli/tests/execution_success/8_integration/target/8_integration.json diff --git a/crates/nargo_cli/tests/test_data/8_integration/target/witness.tr b/crates/nargo_cli/tests/execution_success/8_integration/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/8_integration/target/witness.tr rename to crates/nargo_cli/tests/execution_success/8_integration/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/9_conditional/Nargo.toml b/crates/nargo_cli/tests/execution_success/9_conditional/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/9_conditional/Nargo.toml rename to crates/nargo_cli/tests/execution_success/9_conditional/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/9_conditional/Prover.toml b/crates/nargo_cli/tests/execution_success/9_conditional/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/9_conditional/Prover.toml rename to crates/nargo_cli/tests/execution_success/9_conditional/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/9_conditional/src/main.nr b/crates/nargo_cli/tests/execution_success/9_conditional/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/9_conditional/src/main.nr rename to crates/nargo_cli/tests/execution_success/9_conditional/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/9_conditional/target/9_conditional.json b/crates/nargo_cli/tests/execution_success/9_conditional/target/9_conditional.json similarity index 100% rename from crates/nargo_cli/tests/test_data/9_conditional/target/9_conditional.json rename to crates/nargo_cli/tests/execution_success/9_conditional/target/9_conditional.json diff --git a/crates/nargo_cli/tests/test_data/9_conditional/target/witness.tr b/crates/nargo_cli/tests/execution_success/9_conditional/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/9_conditional/target/witness.tr rename to crates/nargo_cli/tests/execution_success/9_conditional/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/arithmetic_binary_operations/Nargo.toml b/crates/nargo_cli/tests/execution_success/arithmetic_binary_operations/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/arithmetic_binary_operations/Nargo.toml rename to crates/nargo_cli/tests/execution_success/arithmetic_binary_operations/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/arithmetic_binary_operations/Prover.toml b/crates/nargo_cli/tests/execution_success/arithmetic_binary_operations/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/arithmetic_binary_operations/Prover.toml rename to crates/nargo_cli/tests/execution_success/arithmetic_binary_operations/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/arithmetic_binary_operations/src/main.nr b/crates/nargo_cli/tests/execution_success/arithmetic_binary_operations/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/arithmetic_binary_operations/src/main.nr rename to crates/nargo_cli/tests/execution_success/arithmetic_binary_operations/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/arithmetic_binary_operations/target/arithmetic_binary_operations.json b/crates/nargo_cli/tests/execution_success/arithmetic_binary_operations/target/arithmetic_binary_operations.json similarity index 100% rename from crates/nargo_cli/tests/test_data/arithmetic_binary_operations/target/arithmetic_binary_operations.json rename to crates/nargo_cli/tests/execution_success/arithmetic_binary_operations/target/arithmetic_binary_operations.json diff --git a/crates/nargo_cli/tests/test_data/arithmetic_binary_operations/target/witness.tr b/crates/nargo_cli/tests/execution_success/arithmetic_binary_operations/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/arithmetic_binary_operations/target/witness.tr rename to crates/nargo_cli/tests/execution_success/arithmetic_binary_operations/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/array_dynamic/Nargo.toml b/crates/nargo_cli/tests/execution_success/array_dynamic/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/array_dynamic/Nargo.toml rename to crates/nargo_cli/tests/execution_success/array_dynamic/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/array_dynamic/Prover.toml b/crates/nargo_cli/tests/execution_success/array_dynamic/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/array_dynamic/Prover.toml rename to crates/nargo_cli/tests/execution_success/array_dynamic/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/array_dynamic/src/main.nr b/crates/nargo_cli/tests/execution_success/array_dynamic/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/array_dynamic/src/main.nr rename to crates/nargo_cli/tests/execution_success/array_dynamic/src/main.nr diff --git a/crates/nargo_cli/tests/execution_success/array_dynamic/target/array_dynamic.json b/crates/nargo_cli/tests/execution_success/array_dynamic/target/array_dynamic.json new file mode 100644 index 00000000000..23fd96f294a --- /dev/null +++ b/crates/nargo_cli/tests/execution_success/array_dynamic/target/array_dynamic.json @@ -0,0 +1 @@ +{"backend":"acvm-backend-barretenberg","abi":{"parameters":[{"name":"x","type":{"kind":"array","length":5,"type":{"kind":"integer","sign":"unsigned","width":32}},"visibility":"private"},{"name":"z","type":{"kind":"integer","sign":"unsigned","width":32},"visibility":"private"},{"name":"t","type":{"kind":"integer","sign":"unsigned","width":32},"visibility":"private"},{"name":"index","type":{"kind":"array","length":5,"type":{"kind":"field"}},"visibility":"private"},{"name":"index2","type":{"kind":"array","length":5,"type":{"kind":"field"}},"visibility":"private"},{"name":"offset","type":{"kind":"field"},"visibility":"private"},{"name":"sublen","type":{"kind":"field"},"visibility":"private"}],"param_witnesses":{"index":[8,9,10,11,12],"index2":[13,14,15,16,17],"offset":[18],"sublen":[19],"t":[7],"x":[1,2,3,4,5],"z":[6]},"return_type":null,"return_witnesses":[]},"bytecode":"H4sIAAAAAAAA/+1d6XITRxBuS7LBHAZibOxwbUziAAG8q8OWCAkYCDnIfd8BgWRsCAFCpUIVyQ/yFnm4vArZxrNidr0yRc3XU9vFTtXUHpZ7vj7m69lxa/0PEf1L620k7hVzDKzrSua6mrmuZa5HzfWokTuakV81vzNq3RvLyNhiyRixZGyN+3jct8V9e9x3mJ9VrM/sjPtE3HfFfXfc95gxq7SxjZjjOXMM3VprC05WmAPXVXYkKHswRsWSudccp6x74+aYxBa3McsfiZ84RpZpo69GrPOK+Ux1k8+MDJEzbt1Lfn/CwkI4m4RjBI+1cMKSiQYcJRORHRjQ04k5Za4px3igsVOTqBEuNpu9pXovakRXw3qn226FzVZ3sR21o1a7db3ebjR67WZ7qdPtLIWdqNnoRf1Wp943eux1l9UwssIpnI7hMEKqgP04Viz9JQnIO7lNm+M+697zkNuc9XvDyG2Onk1ueXJKchveBuQ2bRmTr9mRQWZMMLmJTUhXWX/gdAw3s58roU8Ddd4H9CvAfgMC87RajRD699dbNweuOkKfMcdZ615J6BiZXgh9htKEzo4MMmOiCd2eRK7kNkM4cpsl3OSuUX5zlZ+0RB6a4Gap+BhfFsDIrSKI0zU29wNk9Z6EZqdepRxiEfDTfpys0MZ7wDqvZXzHLeErAVKOKDNO1o6ipC3lpAMCcg8SLvil9D6I91GKUIpu06ShiW8WiPMQoYiv39OalA8pwHiYSEVSPgyMzQAWm51rvpJyQDJJ+RXrvEzKjjIDY1C03DkqdlJmvefwPhJNymibJq3ISfkI4ZLyZr5xxfkqzn6h8OIhkorPI1T8xYMiP73QOy+vCWDkVhHE6coh84TiOn87L/Mks8h73TovF3mOMueNQdFyj1KxF3ms91G8j0QXeWibDsPpKvsYUGetifSYAozHgRh9JRUkZhvvG9Z5mVQcZR43BkXLPUHFTiqs9wm8j0STCtKmvgpgJJ5SCOc37wUwJ83xlHXveQpgHtNGX2ULYB7Tswtg8uSUBTDD26AAhh34Hz0tgGFHBpkx0QUwgK24QQHMScKRyCnCrkp8EBICsynaWcyBq46QFhKZ1r2yIg8j0wshLVC6Io8dGWTGRBOSPYlcCWmBcIQUEm5yl/vCchgj0pc4EJj7OX/DAsWV98RRN8eGda9MHBiZXhJHndKJgx0ZZMZEJw57ErkmjjrhEkeDZCY3er+2ifOF2j98Im0ghbElgFEinhaBOmuNp0UFGJdIRzy1cTjrWuOprQBjh3TE02kczobWeDqtAOObpCOezuBwNrXG0xkFGN8CYuS3FvFzTPL2Il6bcT5lDuS45bFqlL+JgNJHyk4aNnsapIMb3gbi1Fr8qyGekH4iwXg6S9hcI8hPYr46qwDjOdIRT8vgeCKF8bSsAON5komnCjiekH94u0DY3Ib2Cet6nvBz8k+wryW47YKA3g9IJsarYJwXgbYE+jp6ANDRfEmk6aueF2jLVD3vO9Z5Wc/rKPOiMSha7iXCTUopvS/hfSRaz4u26TCcrrLfhemcLplD43wPhrPTl8T5PgxnXdTvH8BwdkVxXobhDNu8SZi8Op0bxz7HFfuM7XHZ/DzvAQqEQezBZKsCjB8KYJSIuY9IByd+TDo48RPSwYmfkg5O/IywnJh0bhz7HFfsM7YHj2Vzpt1AGMT4ZlwBxs8FMErE3BekgxO/JB2c+BXp4MSvSQcnfkNYTuQNiYTzOPY5rthnbA8eq0bpimPK6BM6tmF2Ct1atE0Bxm8FMErE3HekgxO/Jx2c+APp4MQfSQcn/kRYTuT/LJRwIsc+xxX7jO3BY9XMZ7INhEGMb7YrwPizAEaJmPuFdHDiFdLBiVdJByd2SQcnXiMsJ/K+W8KJHPtX4s4+Y3vwWDXzmWwDYRDjmx0KMF4XwMgN/cU44L5nar/AdS48VGI/4PNAKo+62u8vJfYDzpPoIdB+f3uynyvOHtB+wJiJkPbzVWgCtGWq0MRehJWFJo4ye8agaLkrVOxCE9Z7Be8j0QXtCmFJwMfrNiaFbAvym/fXbdwwx1XrXvniOIxML6/bYAfaL45jRwaZMdGrOnsSub5u4wbhCGmV/BNSATAnpNHIgauOkNbM8aZ1r3z/D0amF0Jao/T7f9iRQWZM9GPSKuEIaQ2I6ybJTO4K2HcvAXW+hcP15N0KeY+GIPli24O3FGD8VQAjN/Tc3i2ksyuu24RdbPjYAkFitvH+Zp2XWyCOMm8bg6Ll3qFib4Gw3nfwPhL9sitysXC34HHJvrlL+CegR+QnEYVuDbowvAfE9QiIy1ciAuqfSkS/W+dlInKUec8YFC33PhU7EbHe9/E+Ev3SJ9KmkxZGnjwczMkXMXjicKEdF5bwdggX9XIRGxdt7KT1IN8Vd16174k7P1lO0sb2P98kYSDAlAAA","proving_key":null,"verification_key":null} \ No newline at end of file diff --git a/crates/nargo_cli/tests/execution_success/array_dynamic/target/witness.tr b/crates/nargo_cli/tests/execution_success/array_dynamic/target/witness.tr new file mode 100644 index 0000000000000000000000000000000000000000..e2ef1e6b213ed43b2f7a2fc0919991ee554f44cd GIT binary patch literal 511 zcmViRxcWtNJ*(tiXyE|=Xi#s6@uO|u1au! zRe|r0YH&}~fUH{3`#O+S51vgLK))J6Rukw~GstQIYitF3s14NB4zfBx?>j+O7g%FA z$m#)W>;-l8f$xrfP?rI)g7|Vxupb4Oqs8gcA<%mpoVO+DR~W2OfoER_oZSb&xnmI2 zH3U8v`Zv7BHIV+ms(V|m5` z=e=44y!4p7V2+!ht}QUfZ7|0jFvnf6#yv2{eK5xZu*O3$ z$0IPuV^G%#nBys!qYLKffqwa5jv8b|DVC5r_`?!f3Cq-4N~M$|wdb0CIO+&fc&=}I zmU4s=Ds~e!qo$`E!}g>M3mI6kpO3b$&%krxImo&IXVFXWym|$)uE81R24vlWHQs@& zdvJd}fUHN5^#rn>LGNF{|9r1tjc?#Lg%65lI`$`~OB-LDF8vL9{{x-Esl1FN005Ey B^~wMM literal 0 HcmV?d00001 diff --git a/crates/nargo_cli/tests/test_data/array_len/Nargo.toml b/crates/nargo_cli/tests/execution_success/array_len/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/array_len/Nargo.toml rename to crates/nargo_cli/tests/execution_success/array_len/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/array_len/Prover.toml b/crates/nargo_cli/tests/execution_success/array_len/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/array_len/Prover.toml rename to crates/nargo_cli/tests/execution_success/array_len/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/array_len/src/main.nr b/crates/nargo_cli/tests/execution_success/array_len/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/array_len/src/main.nr rename to crates/nargo_cli/tests/execution_success/array_len/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/array_len/target/array_len.json b/crates/nargo_cli/tests/execution_success/array_len/target/array_len.json similarity index 100% rename from crates/nargo_cli/tests/test_data/array_len/target/array_len.json rename to crates/nargo_cli/tests/execution_success/array_len/target/array_len.json diff --git a/crates/nargo_cli/tests/test_data/array_len/target/witness.tr b/crates/nargo_cli/tests/execution_success/array_len/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/array_len/target/witness.tr rename to crates/nargo_cli/tests/execution_success/array_len/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/array_neq/Nargo.toml b/crates/nargo_cli/tests/execution_success/array_neq/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/array_neq/Nargo.toml rename to crates/nargo_cli/tests/execution_success/array_neq/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/array_neq/Prover.toml b/crates/nargo_cli/tests/execution_success/array_neq/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/array_neq/Prover.toml rename to crates/nargo_cli/tests/execution_success/array_neq/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/array_neq/src/main.nr b/crates/nargo_cli/tests/execution_success/array_neq/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/array_neq/src/main.nr rename to crates/nargo_cli/tests/execution_success/array_neq/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/array_neq/target/array_neq.json b/crates/nargo_cli/tests/execution_success/array_neq/target/array_neq.json similarity index 100% rename from crates/nargo_cli/tests/test_data/array_neq/target/array_neq.json rename to crates/nargo_cli/tests/execution_success/array_neq/target/array_neq.json diff --git a/crates/nargo_cli/tests/test_data/array_neq/target/witness.tr b/crates/nargo_cli/tests/execution_success/array_neq/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/array_neq/target/witness.tr rename to crates/nargo_cli/tests/execution_success/array_neq/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/array_sort/Nargo.toml b/crates/nargo_cli/tests/execution_success/array_sort/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/array_sort/Nargo.toml rename to crates/nargo_cli/tests/execution_success/array_sort/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/array_sort/Prover.toml b/crates/nargo_cli/tests/execution_success/array_sort/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/array_sort/Prover.toml rename to crates/nargo_cli/tests/execution_success/array_sort/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/array_sort/src/main.nr b/crates/nargo_cli/tests/execution_success/array_sort/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/array_sort/src/main.nr rename to crates/nargo_cli/tests/execution_success/array_sort/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/array_sort/target/array_sort.json b/crates/nargo_cli/tests/execution_success/array_sort/target/array_sort.json similarity index 100% rename from crates/nargo_cli/tests/test_data/array_sort/target/array_sort.json rename to crates/nargo_cli/tests/execution_success/array_sort/target/array_sort.json diff --git a/crates/nargo_cli/tests/test_data/array_sort/target/witness.tr b/crates/nargo_cli/tests/execution_success/array_sort/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/array_sort/target/witness.tr rename to crates/nargo_cli/tests/execution_success/array_sort/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/assert/Nargo.toml b/crates/nargo_cli/tests/execution_success/assert/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/assert/Nargo.toml rename to crates/nargo_cli/tests/execution_success/assert/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/bool_not/Prover.toml b/crates/nargo_cli/tests/execution_success/assert/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/bool_not/Prover.toml rename to crates/nargo_cli/tests/execution_success/assert/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/custom_entry_not_found/src/main.nr b/crates/nargo_cli/tests/execution_success/assert/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/custom_entry_not_found/src/main.nr rename to crates/nargo_cli/tests/execution_success/assert/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/assert/target/assert.json b/crates/nargo_cli/tests/execution_success/assert/target/assert.json similarity index 100% rename from crates/nargo_cli/tests/test_data/assert/target/assert.json rename to crates/nargo_cli/tests/execution_success/assert/target/assert.json diff --git a/crates/nargo_cli/tests/test_data/assert/target/witness.tr b/crates/nargo_cli/tests/execution_success/assert/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/assert/target/witness.tr rename to crates/nargo_cli/tests/execution_success/assert/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/assert_statement/Nargo.toml b/crates/nargo_cli/tests/execution_success/assert_statement/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/assert_statement/Nargo.toml rename to crates/nargo_cli/tests/execution_success/assert_statement/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/assert_statement/Prover.toml b/crates/nargo_cli/tests/execution_success/assert_statement/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/assert_statement/Prover.toml rename to crates/nargo_cli/tests/execution_success/assert_statement/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/assert_statement/src/main.nr b/crates/nargo_cli/tests/execution_success/assert_statement/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/assert_statement/src/main.nr rename to crates/nargo_cli/tests/execution_success/assert_statement/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/assert_statement/target/assert_statement.json b/crates/nargo_cli/tests/execution_success/assert_statement/target/assert_statement.json similarity index 100% rename from crates/nargo_cli/tests/test_data/assert_statement/target/assert_statement.json rename to crates/nargo_cli/tests/execution_success/assert_statement/target/assert_statement.json diff --git a/crates/nargo_cli/tests/test_data/assert_statement/target/witness.tr b/crates/nargo_cli/tests/execution_success/assert_statement/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/assert_statement/target/witness.tr rename to crates/nargo_cli/tests/execution_success/assert_statement/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/assign_ex/Nargo.toml b/crates/nargo_cli/tests/execution_success/assign_ex/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/assign_ex/Nargo.toml rename to crates/nargo_cli/tests/execution_success/assign_ex/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/assign_ex/Prover.toml b/crates/nargo_cli/tests/execution_success/assign_ex/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/assign_ex/Prover.toml rename to crates/nargo_cli/tests/execution_success/assign_ex/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/assign_ex/src/main.nr b/crates/nargo_cli/tests/execution_success/assign_ex/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/assign_ex/src/main.nr rename to crates/nargo_cli/tests/execution_success/assign_ex/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/assign_ex/target/assign_ex.json b/crates/nargo_cli/tests/execution_success/assign_ex/target/assign_ex.json similarity index 100% rename from crates/nargo_cli/tests/test_data/assign_ex/target/assign_ex.json rename to crates/nargo_cli/tests/execution_success/assign_ex/target/assign_ex.json diff --git a/crates/nargo_cli/tests/test_data/assign_ex/target/witness.tr b/crates/nargo_cli/tests/execution_success/assign_ex/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/assign_ex/target/witness.tr rename to crates/nargo_cli/tests/execution_success/assign_ex/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/bit_and/Nargo.toml b/crates/nargo_cli/tests/execution_success/bit_and/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/bit_and/Nargo.toml rename to crates/nargo_cli/tests/execution_success/bit_and/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/bit_and/Prover.toml b/crates/nargo_cli/tests/execution_success/bit_and/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/bit_and/Prover.toml rename to crates/nargo_cli/tests/execution_success/bit_and/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/bit_and/src/main.nr b/crates/nargo_cli/tests/execution_success/bit_and/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/bit_and/src/main.nr rename to crates/nargo_cli/tests/execution_success/bit_and/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/bit_and/target/bit_and.json b/crates/nargo_cli/tests/execution_success/bit_and/target/bit_and.json similarity index 100% rename from crates/nargo_cli/tests/test_data/bit_and/target/bit_and.json rename to crates/nargo_cli/tests/execution_success/bit_and/target/bit_and.json diff --git a/crates/nargo_cli/tests/test_data/bit_and/target/witness.tr b/crates/nargo_cli/tests/execution_success/bit_and/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/bit_and/target/witness.tr rename to crates/nargo_cli/tests/execution_success/bit_and/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/bit_shifts_comptime/Nargo.toml b/crates/nargo_cli/tests/execution_success/bit_shifts_comptime/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/bit_shifts_comptime/Nargo.toml rename to crates/nargo_cli/tests/execution_success/bit_shifts_comptime/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/bit_shifts_comptime/Prover.toml b/crates/nargo_cli/tests/execution_success/bit_shifts_comptime/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/bit_shifts_comptime/Prover.toml rename to crates/nargo_cli/tests/execution_success/bit_shifts_comptime/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/bit_shifts_comptime/src/main.nr b/crates/nargo_cli/tests/execution_success/bit_shifts_comptime/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/bit_shifts_comptime/src/main.nr rename to crates/nargo_cli/tests/execution_success/bit_shifts_comptime/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/bit_shifts_comptime/target/bit_shifts_comptime.json b/crates/nargo_cli/tests/execution_success/bit_shifts_comptime/target/bit_shifts_comptime.json similarity index 100% rename from crates/nargo_cli/tests/test_data/bit_shifts_comptime/target/bit_shifts_comptime.json rename to crates/nargo_cli/tests/execution_success/bit_shifts_comptime/target/bit_shifts_comptime.json diff --git a/crates/nargo_cli/tests/test_data/bit_shifts_comptime/target/witness.tr b/crates/nargo_cli/tests/execution_success/bit_shifts_comptime/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/bit_shifts_comptime/target/witness.tr rename to crates/nargo_cli/tests/execution_success/bit_shifts_comptime/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/bit_shifts_runtime/Nargo.toml b/crates/nargo_cli/tests/execution_success/bit_shifts_runtime/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/bit_shifts_runtime/Nargo.toml rename to crates/nargo_cli/tests/execution_success/bit_shifts_runtime/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/bit_shifts_runtime/Prover.toml b/crates/nargo_cli/tests/execution_success/bit_shifts_runtime/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/bit_shifts_runtime/Prover.toml rename to crates/nargo_cli/tests/execution_success/bit_shifts_runtime/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/bit_shifts_runtime/src/main.nr b/crates/nargo_cli/tests/execution_success/bit_shifts_runtime/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/bit_shifts_runtime/src/main.nr rename to crates/nargo_cli/tests/execution_success/bit_shifts_runtime/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/bit_shifts_runtime/target/bit_shifts_runtime.json b/crates/nargo_cli/tests/execution_success/bit_shifts_runtime/target/bit_shifts_runtime.json similarity index 100% rename from crates/nargo_cli/tests/test_data/bit_shifts_runtime/target/bit_shifts_runtime.json rename to crates/nargo_cli/tests/execution_success/bit_shifts_runtime/target/bit_shifts_runtime.json diff --git a/crates/nargo_cli/tests/test_data/bit_shifts_runtime/target/witness.tr b/crates/nargo_cli/tests/execution_success/bit_shifts_runtime/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/bit_shifts_runtime/target/witness.tr rename to crates/nargo_cli/tests/execution_success/bit_shifts_runtime/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/blackbox_func_simple_call/Nargo.toml b/crates/nargo_cli/tests/execution_success/blackbox_func_simple_call/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/blackbox_func_simple_call/Nargo.toml rename to crates/nargo_cli/tests/execution_success/blackbox_func_simple_call/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/blackbox_func_simple_call/Prover.toml b/crates/nargo_cli/tests/execution_success/blackbox_func_simple_call/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/blackbox_func_simple_call/Prover.toml rename to crates/nargo_cli/tests/execution_success/blackbox_func_simple_call/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/blackbox_func_simple_call/src/main.nr b/crates/nargo_cli/tests/execution_success/blackbox_func_simple_call/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/blackbox_func_simple_call/src/main.nr rename to crates/nargo_cli/tests/execution_success/blackbox_func_simple_call/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/blackbox_func_simple_call/target/blackbox_func_simple_call.json b/crates/nargo_cli/tests/execution_success/blackbox_func_simple_call/target/blackbox_func_simple_call.json similarity index 100% rename from crates/nargo_cli/tests/test_data/blackbox_func_simple_call/target/blackbox_func_simple_call.json rename to crates/nargo_cli/tests/execution_success/blackbox_func_simple_call/target/blackbox_func_simple_call.json diff --git a/crates/nargo_cli/tests/test_data/blackbox_func_simple_call/target/witness.tr b/crates/nargo_cli/tests/execution_success/blackbox_func_simple_call/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/blackbox_func_simple_call/target/witness.tr rename to crates/nargo_cli/tests/execution_success/blackbox_func_simple_call/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/bool_not/Nargo.toml b/crates/nargo_cli/tests/execution_success/bool_not/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/bool_not/Nargo.toml rename to crates/nargo_cli/tests/execution_success/bool_not/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_assert/Prover.toml b/crates/nargo_cli/tests/execution_success/bool_not/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_assert/Prover.toml rename to crates/nargo_cli/tests/execution_success/bool_not/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/bool_not/src/main.nr b/crates/nargo_cli/tests/execution_success/bool_not/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/bool_not/src/main.nr rename to crates/nargo_cli/tests/execution_success/bool_not/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/bool_not/target/bool_not.json b/crates/nargo_cli/tests/execution_success/bool_not/target/bool_not.json similarity index 100% rename from crates/nargo_cli/tests/test_data/bool_not/target/bool_not.json rename to crates/nargo_cli/tests/execution_success/bool_not/target/bool_not.json diff --git a/crates/nargo_cli/tests/test_data/bool_not/target/witness.tr b/crates/nargo_cli/tests/execution_success/bool_not/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/bool_not/target/witness.tr rename to crates/nargo_cli/tests/execution_success/bool_not/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/bool_or/Nargo.toml b/crates/nargo_cli/tests/execution_success/bool_or/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/bool_or/Nargo.toml rename to crates/nargo_cli/tests/execution_success/bool_or/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/tuples/Prover.toml b/crates/nargo_cli/tests/execution_success/bool_or/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/tuples/Prover.toml rename to crates/nargo_cli/tests/execution_success/bool_or/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/bool_or/src/main.nr b/crates/nargo_cli/tests/execution_success/bool_or/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/bool_or/src/main.nr rename to crates/nargo_cli/tests/execution_success/bool_or/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/bool_or/target/bool_or.json b/crates/nargo_cli/tests/execution_success/bool_or/target/bool_or.json similarity index 100% rename from crates/nargo_cli/tests/test_data/bool_or/target/bool_or.json rename to crates/nargo_cli/tests/execution_success/bool_or/target/bool_or.json diff --git a/crates/nargo_cli/tests/test_data/bool_or/target/witness.tr b/crates/nargo_cli/tests/execution_success/bool_or/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/bool_or/target/witness.tr rename to crates/nargo_cli/tests/execution_success/bool_or/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_acir_as_brillig/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_acir_as_brillig/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_acir_as_brillig/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_acir_as_brillig/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_assert_fail/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_acir_as_brillig/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_assert_fail/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_acir_as_brillig/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_acir_as_brillig/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_acir_as_brillig/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_acir_as_brillig/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_acir_as_brillig/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_acir_as_brillig/target/brillig_acir_as_brillig.json b/crates/nargo_cli/tests/execution_success/brillig_acir_as_brillig/target/brillig_acir_as_brillig.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_acir_as_brillig/target/brillig_acir_as_brillig.json rename to crates/nargo_cli/tests/execution_success/brillig_acir_as_brillig/target/brillig_acir_as_brillig.json diff --git a/crates/nargo_cli/tests/test_data/brillig_acir_as_brillig/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_acir_as_brillig/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_acir_as_brillig/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_acir_as_brillig/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_arrays/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_arrays/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_arrays/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_arrays/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_arrays/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_arrays/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_arrays/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_arrays/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_arrays/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_arrays/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_arrays/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_arrays/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_arrays/target/brillig_arrays.json b/crates/nargo_cli/tests/execution_success/brillig_arrays/target/brillig_arrays.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_arrays/target/brillig_arrays.json rename to crates/nargo_cli/tests/execution_success/brillig_arrays/target/brillig_arrays.json diff --git a/crates/nargo_cli/tests/test_data/brillig_arrays/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_arrays/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_arrays/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_arrays/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_assert/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_assert/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_assert/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_assert/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_conditional/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_assert/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_conditional/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_assert/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_assert_fail/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_assert/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_assert_fail/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_assert/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_assert/target/brillig_assert.json b/crates/nargo_cli/tests/execution_success/brillig_assert/target/brillig_assert.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_assert/target/brillig_assert.json rename to crates/nargo_cli/tests/execution_success/brillig_assert/target/brillig_assert.json diff --git a/crates/nargo_cli/tests/test_data/brillig_assert/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_assert/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_assert/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_assert/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_blake2s/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_blake2s/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_blake2s/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_blake2s/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_blake2s/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_blake2s/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_blake2s/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_blake2s/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_blake2s/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_blake2s/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_blake2s/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_blake2s/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_blake2s/target/brillig_blake2s.json b/crates/nargo_cli/tests/execution_success/brillig_blake2s/target/brillig_blake2s.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_blake2s/target/brillig_blake2s.json rename to crates/nargo_cli/tests/execution_success/brillig_blake2s/target/brillig_blake2s.json diff --git a/crates/nargo_cli/tests/test_data/brillig_blake2s/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_blake2s/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_blake2s/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_blake2s/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_calls/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_calls/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_calls/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_calls/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_calls/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_calls/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_calls/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_calls/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_calls/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_calls/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_calls/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_calls/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_calls/target/brillig_calls.json b/crates/nargo_cli/tests/execution_success/brillig_calls/target/brillig_calls.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_calls/target/brillig_calls.json rename to crates/nargo_cli/tests/execution_success/brillig_calls/target/brillig_calls.json diff --git a/crates/nargo_cli/tests/test_data/brillig_calls/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_calls/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_calls/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_calls/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_calls_array/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_calls_array/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_calls_array/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_calls_array/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_calls_array/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_calls_array/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_calls_array/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_calls_array/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_calls_array/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_calls_array/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_calls_array/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_calls_array/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_calls_array/target/brillig_calls_array.json b/crates/nargo_cli/tests/execution_success/brillig_calls_array/target/brillig_calls_array.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_calls_array/target/brillig_calls_array.json rename to crates/nargo_cli/tests/execution_success/brillig_calls_array/target/brillig_calls_array.json diff --git a/crates/nargo_cli/tests/test_data/brillig_calls_array/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_calls_array/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_calls_array/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_calls_array/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_calls_conditionals/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_calls_conditionals/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_calls_conditionals/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_calls_conditionals/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_calls_conditionals/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_calls_conditionals/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_calls_conditionals/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_calls_conditionals/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_calls_conditionals/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_calls_conditionals/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_calls_conditionals/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_calls_conditionals/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_calls_conditionals/target/brillig_calls_conditionals.json b/crates/nargo_cli/tests/execution_success/brillig_calls_conditionals/target/brillig_calls_conditionals.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_calls_conditionals/target/brillig_calls_conditionals.json rename to crates/nargo_cli/tests/execution_success/brillig_calls_conditionals/target/brillig_calls_conditionals.json diff --git a/crates/nargo_cli/tests/test_data/brillig_calls_conditionals/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_calls_conditionals/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_calls_conditionals/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_calls_conditionals/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_cast/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_cast/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_cast/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_cast/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_integer_binary_operations/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_cast/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_integer_binary_operations/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_cast/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_cast/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_cast/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_cast/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_cast/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_cast/target/brillig_cast.json b/crates/nargo_cli/tests/execution_success/brillig_cast/target/brillig_cast.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_cast/target/brillig_cast.json rename to crates/nargo_cli/tests/execution_success/brillig_cast/target/brillig_cast.json diff --git a/crates/nargo_cli/tests/test_data/brillig_cast/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_cast/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_cast/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_cast/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_conditional/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_conditional/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_conditional/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_conditional/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/custom_entry/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_conditional/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/custom_entry/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_conditional/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_conditional/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_conditional/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_conditional/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_conditional/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_conditional/target/brillig_conditional.json b/crates/nargo_cli/tests/execution_success/brillig_conditional/target/brillig_conditional.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_conditional/target/brillig_conditional.json rename to crates/nargo_cli/tests/execution_success/brillig_conditional/target/brillig_conditional.json diff --git a/crates/nargo_cli/tests/test_data/brillig_conditional/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_conditional/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_conditional/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_conditional/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_ecdsa/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_ecdsa/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_ecdsa/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_ecdsa/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_ecdsa/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_ecdsa/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_ecdsa/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_ecdsa/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_ecdsa/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_ecdsa/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_ecdsa/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_ecdsa/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_ecdsa/target/brillig_ecdsa.json b/crates/nargo_cli/tests/execution_success/brillig_ecdsa/target/brillig_ecdsa.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_ecdsa/target/brillig_ecdsa.json rename to crates/nargo_cli/tests/execution_success/brillig_ecdsa/target/brillig_ecdsa.json diff --git a/crates/nargo_cli/tests/test_data/brillig_ecdsa/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_ecdsa/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_ecdsa/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_ecdsa/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_field_binary_operations/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_field_binary_operations/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_field_binary_operations/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_field_binary_operations/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_modulo/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_field_binary_operations/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_modulo/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_field_binary_operations/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_field_binary_operations/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_field_binary_operations/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_field_binary_operations/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_field_binary_operations/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_field_binary_operations/target/brillig_field_binary_operations.json b/crates/nargo_cli/tests/execution_success/brillig_field_binary_operations/target/brillig_field_binary_operations.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_field_binary_operations/target/brillig_field_binary_operations.json rename to crates/nargo_cli/tests/execution_success/brillig_field_binary_operations/target/brillig_field_binary_operations.json diff --git a/crates/nargo_cli/tests/test_data/brillig_field_binary_operations/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_field_binary_operations/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_field_binary_operations/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_field_binary_operations/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_fns_as_values/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_fns_as_values/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_fns_as_values/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_fns_as_values/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_fns_as_values/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_fns_as_values/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_fns_as_values/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_fns_as_values/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_fns_as_values/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_fns_as_values/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_fns_as_values/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_fns_as_values/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_fns_as_values/target/brillig_fns_as_values.json b/crates/nargo_cli/tests/execution_success/brillig_fns_as_values/target/brillig_fns_as_values.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_fns_as_values/target/brillig_fns_as_values.json rename to crates/nargo_cli/tests/execution_success/brillig_fns_as_values/target/brillig_fns_as_values.json diff --git a/crates/nargo_cli/tests/test_data/brillig_fns_as_values/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_fns_as_values/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_fns_as_values/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_fns_as_values/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_hash_to_field/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_hash_to_field/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_hash_to_field/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_hash_to_field/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_hash_to_field/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_hash_to_field/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_hash_to_field/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_hash_to_field/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_hash_to_field/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_hash_to_field/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_hash_to_field/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_hash_to_field/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_hash_to_field/target/brillig_hash_to_field.json b/crates/nargo_cli/tests/execution_success/brillig_hash_to_field/target/brillig_hash_to_field.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_hash_to_field/target/brillig_hash_to_field.json rename to crates/nargo_cli/tests/execution_success/brillig_hash_to_field/target/brillig_hash_to_field.json diff --git a/crates/nargo_cli/tests/test_data/brillig_hash_to_field/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_hash_to_field/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_hash_to_field/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_hash_to_field/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_identity_function/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_identity_function/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_identity_function/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_identity_function/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_identity_function/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_identity_function/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_identity_function/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_identity_function/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_identity_function/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_identity_function/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_identity_function/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_identity_function/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_identity_function/target/brillig_identity_function.json b/crates/nargo_cli/tests/execution_success/brillig_identity_function/target/brillig_identity_function.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_identity_function/target/brillig_identity_function.json rename to crates/nargo_cli/tests/execution_success/brillig_identity_function/target/brillig_identity_function.json diff --git a/crates/nargo_cli/tests/test_data/brillig_identity_function/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_identity_function/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_identity_function/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_identity_function/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_integer_binary_operations/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_integer_binary_operations/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_integer_binary_operations/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_integer_binary_operations/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/higher_order_functions/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_integer_binary_operations/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/higher_order_functions/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_integer_binary_operations/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_integer_binary_operations/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_integer_binary_operations/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_integer_binary_operations/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_integer_binary_operations/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_integer_binary_operations/target/brillig_integer_binary_operations.json b/crates/nargo_cli/tests/execution_success/brillig_integer_binary_operations/target/brillig_integer_binary_operations.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_integer_binary_operations/target/brillig_integer_binary_operations.json rename to crates/nargo_cli/tests/execution_success/brillig_integer_binary_operations/target/brillig_integer_binary_operations.json diff --git a/crates/nargo_cli/tests/test_data/brillig_integer_binary_operations/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_integer_binary_operations/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_integer_binary_operations/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_integer_binary_operations/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_keccak/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_keccak/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_keccak/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_keccak/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_keccak/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_keccak/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_keccak/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_keccak/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_keccak/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_keccak/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_keccak/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_keccak/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_keccak/target/brillig_keccak.json b/crates/nargo_cli/tests/execution_success/brillig_keccak/target/brillig_keccak.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_keccak/target/brillig_keccak.json rename to crates/nargo_cli/tests/execution_success/brillig_keccak/target/brillig_keccak.json diff --git a/crates/nargo_cli/tests/test_data/brillig_keccak/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_keccak/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_keccak/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_keccak/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_loop/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_loop/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_loop/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_loop/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_loop/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_loop/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_loop/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_loop/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_loop/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_loop/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_loop/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_loop/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_loop/target/brillig_loop.json b/crates/nargo_cli/tests/execution_success/brillig_loop/target/brillig_loop.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_loop/target/brillig_loop.json rename to crates/nargo_cli/tests/execution_success/brillig_loop/target/brillig_loop.json diff --git a/crates/nargo_cli/tests/test_data/brillig_loop/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_loop/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_loop/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_loop/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_modulo/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_modulo/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_modulo/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_modulo/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/let_stmt/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_modulo/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/let_stmt/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_modulo/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_modulo/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_modulo/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_modulo/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_modulo/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_modulo/target/brillig_modulo.json b/crates/nargo_cli/tests/execution_success/brillig_modulo/target/brillig_modulo.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_modulo/target/brillig_modulo.json rename to crates/nargo_cli/tests/execution_success/brillig_modulo/target/brillig_modulo.json diff --git a/crates/nargo_cli/tests/test_data/brillig_modulo/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_modulo/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_modulo/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_modulo/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_nested_arrays/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_nested_arrays/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_nested_arrays/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_nested_arrays/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_nested_arrays/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_nested_arrays/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_nested_arrays/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_nested_arrays/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_nested_arrays/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_nested_arrays/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_nested_arrays/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_nested_arrays/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_nested_arrays/target/brillig_nested_arrays.json b/crates/nargo_cli/tests/execution_success/brillig_nested_arrays/target/brillig_nested_arrays.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_nested_arrays/target/brillig_nested_arrays.json rename to crates/nargo_cli/tests/execution_success/brillig_nested_arrays/target/brillig_nested_arrays.json diff --git a/crates/nargo_cli/tests/test_data/brillig_nested_arrays/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_nested_arrays/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_nested_arrays/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_nested_arrays/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_not/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_not/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_not/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_not/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/workspace/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_not/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_not/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_not/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_not/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_not/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_not/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_not/target/brillig_not.json b/crates/nargo_cli/tests/execution_success/brillig_not/target/brillig_not.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_not/target/brillig_not.json rename to crates/nargo_cli/tests/execution_success/brillig_not/target/brillig_not.json diff --git a/crates/nargo_cli/tests/test_data/brillig_not/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_not/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_not/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_not/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_oracle/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_oracle/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_oracle/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_oracle/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_oracle/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_oracle/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_oracle/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_oracle/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_oracle/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_oracle/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_oracle/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_oracle/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_oracle/target/brillig_oracle.json b/crates/nargo_cli/tests/execution_success/brillig_oracle/target/brillig_oracle.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_oracle/target/brillig_oracle.json rename to crates/nargo_cli/tests/execution_success/brillig_oracle/target/brillig_oracle.json diff --git a/crates/nargo_cli/tests/test_data/brillig_oracle/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_oracle/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_oracle/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_oracle/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_pedersen/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_pedersen/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_pedersen/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_pedersen/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_pedersen/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_pedersen/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_pedersen/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_pedersen/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_pedersen/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_pedersen/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_pedersen/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_pedersen/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_pedersen/target/brillig_pedersen.json b/crates/nargo_cli/tests/execution_success/brillig_pedersen/target/brillig_pedersen.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_pedersen/target/brillig_pedersen.json rename to crates/nargo_cli/tests/execution_success/brillig_pedersen/target/brillig_pedersen.json diff --git a/crates/nargo_cli/tests/test_data/brillig_pedersen/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_pedersen/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_pedersen/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_pedersen/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_recursion/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_recursion/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_recursion/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_recursion/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_recursion/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_recursion/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_recursion/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_recursion/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_recursion/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_recursion/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_recursion/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_recursion/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_recursion/target/brillig_recursion.json b/crates/nargo_cli/tests/execution_success/brillig_recursion/target/brillig_recursion.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_recursion/target/brillig_recursion.json rename to crates/nargo_cli/tests/execution_success/brillig_recursion/target/brillig_recursion.json diff --git a/crates/nargo_cli/tests/test_data/brillig_recursion/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_recursion/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_recursion/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_recursion/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_references/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_references/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_references/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_references/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_references/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_references/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_references/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_references/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_references/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_references/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_references/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_references/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_references/target/brillig_references.json b/crates/nargo_cli/tests/execution_success/brillig_references/target/brillig_references.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_references/target/brillig_references.json rename to crates/nargo_cli/tests/execution_success/brillig_references/target/brillig_references.json diff --git a/crates/nargo_cli/tests/test_data/brillig_references/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_references/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_references/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_references/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_scalar_mul/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_scalar_mul/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_scalar_mul/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_scalar_mul/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_scalar_mul/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_scalar_mul/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_scalar_mul/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_scalar_mul/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_scalar_mul/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_scalar_mul/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_scalar_mul/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_scalar_mul/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_scalar_mul/target/brillig_scalar_mul.json b/crates/nargo_cli/tests/execution_success/brillig_scalar_mul/target/brillig_scalar_mul.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_scalar_mul/target/brillig_scalar_mul.json rename to crates/nargo_cli/tests/execution_success/brillig_scalar_mul/target/brillig_scalar_mul.json diff --git a/crates/nargo_cli/tests/test_data/brillig_scalar_mul/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_scalar_mul/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_scalar_mul/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_scalar_mul/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_schnorr/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_schnorr/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_schnorr/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_schnorr/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_schnorr/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_schnorr/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_schnorr/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_schnorr/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_schnorr/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_schnorr/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_schnorr/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_schnorr/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_schnorr/target/brillig_schnorr.json b/crates/nargo_cli/tests/execution_success/brillig_schnorr/target/brillig_schnorr.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_schnorr/target/brillig_schnorr.json rename to crates/nargo_cli/tests/execution_success/brillig_schnorr/target/brillig_schnorr.json diff --git a/crates/nargo_cli/tests/test_data/brillig_schnorr/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_schnorr/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_schnorr/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_schnorr/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_sha256/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_sha256/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_sha256/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_sha256/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_sha256/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_sha256/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_sha256/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_sha256/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_sha256/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_sha256/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_sha256/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_sha256/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_sha256/target/brillig_sha256.json b/crates/nargo_cli/tests/execution_success/brillig_sha256/target/brillig_sha256.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_sha256/target/brillig_sha256.json rename to crates/nargo_cli/tests/execution_success/brillig_sha256/target/brillig_sha256.json diff --git a/crates/nargo_cli/tests/test_data/brillig_sha256/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_sha256/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_sha256/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_sha256/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_slices/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_slices/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_slices/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_slices/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_slices/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_slices/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_slices/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_slices/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_slices/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_slices/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_slices/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_slices/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_slices/target/brillig_slices.json b/crates/nargo_cli/tests/execution_success/brillig_slices/target/brillig_slices.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_slices/target/brillig_slices.json rename to crates/nargo_cli/tests/execution_success/brillig_slices/target/brillig_slices.json diff --git a/crates/nargo_cli/tests/test_data/brillig_slices/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_slices/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_slices/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_slices/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_to_be_bytes/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_to_be_bytes/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_be_bytes/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_to_be_bytes/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_to_be_bytes/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_to_be_bytes/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_be_bytes/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_to_be_bytes/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_to_be_bytes/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_to_be_bytes/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_be_bytes/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_to_be_bytes/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_to_be_bytes/target/brillig_to_be_bytes.json b/crates/nargo_cli/tests/execution_success/brillig_to_be_bytes/target/brillig_to_be_bytes.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_be_bytes/target/brillig_to_be_bytes.json rename to crates/nargo_cli/tests/execution_success/brillig_to_be_bytes/target/brillig_to_be_bytes.json diff --git a/crates/nargo_cli/tests/test_data/brillig_to_be_bytes/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_to_be_bytes/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_be_bytes/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_to_be_bytes/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_to_bits/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_to_bits/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_bits/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_to_bits/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_to_bits/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_to_bits/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_bits/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_to_bits/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_to_bits/target/brillig_to_bits.json b/crates/nargo_cli/tests/execution_success/brillig_to_bits/target/brillig_to_bits.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_bits/target/brillig_to_bits.json rename to crates/nargo_cli/tests/execution_success/brillig_to_bits/target/brillig_to_bits.json diff --git a/crates/nargo_cli/tests/test_data/brillig_to_bits/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_to_bits/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_bits/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_to_bits/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_to_bytes_integration/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_to_bytes_integration/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_bytes_integration/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_to_bytes_integration/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_to_bytes_integration/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_to_bytes_integration/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_bytes_integration/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_to_bytes_integration/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_to_bytes_integration/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_to_bytes_integration/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_bytes_integration/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_to_bytes_integration/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_to_bytes_integration/target/brillig_to_bytes_integration.json b/crates/nargo_cli/tests/execution_success/brillig_to_bytes_integration/target/brillig_to_bytes_integration.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_bytes_integration/target/brillig_to_bytes_integration.json rename to crates/nargo_cli/tests/execution_success/brillig_to_bytes_integration/target/brillig_to_bytes_integration.json diff --git a/crates/nargo_cli/tests/test_data/brillig_to_bytes_integration/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_to_bytes_integration/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_bytes_integration/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_to_bytes_integration/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_to_le_bytes/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_to_le_bytes/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_le_bytes/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_to_le_bytes/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_to_le_bytes/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_to_le_bytes/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_le_bytes/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_to_le_bytes/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_to_le_bytes/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_to_le_bytes/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_le_bytes/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_to_le_bytes/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_to_le_bytes/target/brillig_to_le_bytes.json b/crates/nargo_cli/tests/execution_success/brillig_to_le_bytes/target/brillig_to_le_bytes.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_le_bytes/target/brillig_to_le_bytes.json rename to crates/nargo_cli/tests/execution_success/brillig_to_le_bytes/target/brillig_to_le_bytes.json diff --git a/crates/nargo_cli/tests/test_data/brillig_to_le_bytes/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_to_le_bytes/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_to_le_bytes/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_to_le_bytes/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/brillig_top_level/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_top_level/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_top_level/Nargo.toml rename to crates/nargo_cli/tests/execution_success/brillig_top_level/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_top_level/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_top_level/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_top_level/Prover.toml rename to crates/nargo_cli/tests/execution_success/brillig_top_level/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/brillig_top_level/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_top_level/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_top_level/src/main.nr rename to crates/nargo_cli/tests/execution_success/brillig_top_level/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/brillig_top_level/target/brillig_top_level.json b/crates/nargo_cli/tests/execution_success/brillig_top_level/target/brillig_top_level.json similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_top_level/target/brillig_top_level.json rename to crates/nargo_cli/tests/execution_success/brillig_top_level/target/brillig_top_level.json diff --git a/crates/nargo_cli/tests/test_data/brillig_top_level/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_top_level/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/brillig_top_level/target/witness.tr rename to crates/nargo_cli/tests/execution_success/brillig_top_level/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/cast_bool/Nargo.toml b/crates/nargo_cli/tests/execution_success/cast_bool/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/cast_bool/Nargo.toml rename to crates/nargo_cli/tests/execution_success/cast_bool/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/cast_bool/Prover.toml b/crates/nargo_cli/tests/execution_success/cast_bool/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/cast_bool/Prover.toml rename to crates/nargo_cli/tests/execution_success/cast_bool/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/cast_bool/src/main.nr b/crates/nargo_cli/tests/execution_success/cast_bool/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/cast_bool/src/main.nr rename to crates/nargo_cli/tests/execution_success/cast_bool/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/cast_bool/target/cast_bool.json b/crates/nargo_cli/tests/execution_success/cast_bool/target/cast_bool.json similarity index 100% rename from crates/nargo_cli/tests/test_data/cast_bool/target/cast_bool.json rename to crates/nargo_cli/tests/execution_success/cast_bool/target/cast_bool.json diff --git a/crates/nargo_cli/tests/test_data/cast_bool/target/witness.tr b/crates/nargo_cli/tests/execution_success/cast_bool/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/cast_bool/target/witness.tr rename to crates/nargo_cli/tests/execution_success/cast_bool/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/closures_mut_ref/Nargo.toml b/crates/nargo_cli/tests/execution_success/closures_mut_ref/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/closures_mut_ref/Nargo.toml rename to crates/nargo_cli/tests/execution_success/closures_mut_ref/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/closures_mut_ref/Prover.toml b/crates/nargo_cli/tests/execution_success/closures_mut_ref/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/closures_mut_ref/Prover.toml rename to crates/nargo_cli/tests/execution_success/closures_mut_ref/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/closures_mut_ref/src/main.nr b/crates/nargo_cli/tests/execution_success/closures_mut_ref/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/closures_mut_ref/src/main.nr rename to crates/nargo_cli/tests/execution_success/closures_mut_ref/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/closures_mut_ref/target/closures_mut_ref.json b/crates/nargo_cli/tests/execution_success/closures_mut_ref/target/closures_mut_ref.json similarity index 100% rename from crates/nargo_cli/tests/test_data/closures_mut_ref/target/closures_mut_ref.json rename to crates/nargo_cli/tests/execution_success/closures_mut_ref/target/closures_mut_ref.json diff --git a/crates/nargo_cli/tests/test_data/closures_mut_ref/target/witness.tr b/crates/nargo_cli/tests/execution_success/closures_mut_ref/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/closures_mut_ref/target/witness.tr rename to crates/nargo_cli/tests/execution_success/closures_mut_ref/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/comptime_array_access/Nargo.toml b/crates/nargo_cli/tests/execution_success/comptime_array_access/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/comptime_array_access/Nargo.toml rename to crates/nargo_cli/tests/execution_success/comptime_array_access/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/comptime_array_access/Prover.toml b/crates/nargo_cli/tests/execution_success/comptime_array_access/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/comptime_array_access/Prover.toml rename to crates/nargo_cli/tests/execution_success/comptime_array_access/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/comptime_array_access/src/main.nr b/crates/nargo_cli/tests/execution_success/comptime_array_access/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/comptime_array_access/src/main.nr rename to crates/nargo_cli/tests/execution_success/comptime_array_access/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/comptime_array_access/target/comptime_array_access.json b/crates/nargo_cli/tests/execution_success/comptime_array_access/target/comptime_array_access.json similarity index 100% rename from crates/nargo_cli/tests/test_data/comptime_array_access/target/comptime_array_access.json rename to crates/nargo_cli/tests/execution_success/comptime_array_access/target/comptime_array_access.json diff --git a/crates/nargo_cli/tests/test_data/comptime_array_access/target/witness.tr b/crates/nargo_cli/tests/execution_success/comptime_array_access/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/comptime_array_access/target/witness.tr rename to crates/nargo_cli/tests/execution_success/comptime_array_access/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/comptime_recursion_regression/Nargo.toml b/crates/nargo_cli/tests/execution_success/comptime_recursion_regression/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/comptime_recursion_regression/Nargo.toml rename to crates/nargo_cli/tests/execution_success/comptime_recursion_regression/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/comptime_recursion_regression/Prover.toml b/crates/nargo_cli/tests/execution_success/comptime_recursion_regression/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/comptime_recursion_regression/Prover.toml rename to crates/nargo_cli/tests/execution_success/comptime_recursion_regression/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/comptime_recursion_regression/src/main.nr b/crates/nargo_cli/tests/execution_success/comptime_recursion_regression/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/comptime_recursion_regression/src/main.nr rename to crates/nargo_cli/tests/execution_success/comptime_recursion_regression/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/comptime_recursion_regression/target/comptime_recursion_regression.json b/crates/nargo_cli/tests/execution_success/comptime_recursion_regression/target/comptime_recursion_regression.json similarity index 100% rename from crates/nargo_cli/tests/test_data/comptime_recursion_regression/target/comptime_recursion_regression.json rename to crates/nargo_cli/tests/execution_success/comptime_recursion_regression/target/comptime_recursion_regression.json diff --git a/crates/nargo_cli/tests/test_data/comptime_recursion_regression/target/witness.tr b/crates/nargo_cli/tests/execution_success/comptime_recursion_regression/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/comptime_recursion_regression/target/witness.tr rename to crates/nargo_cli/tests/execution_success/comptime_recursion_regression/target/witness.tr diff --git a/crates/nargo_cli/tests/execution_success/config.toml b/crates/nargo_cli/tests/execution_success/config.toml new file mode 100644 index 00000000000..3f16e941ba9 --- /dev/null +++ b/crates/nargo_cli/tests/execution_success/config.toml @@ -0,0 +1,3 @@ +# Dummy file included for backwards compatibility +exclude = [] +fail = [] diff --git a/crates/nargo_cli/tests/test_data/constant_return/Nargo.toml b/crates/nargo_cli/tests/execution_success/constant_return/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/constant_return/Nargo.toml rename to crates/nargo_cli/tests/execution_success/constant_return/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/constant_return/Prover.toml b/crates/nargo_cli/tests/execution_success/constant_return/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/constant_return/Prover.toml rename to crates/nargo_cli/tests/execution_success/constant_return/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/constant_return/src/main.nr b/crates/nargo_cli/tests/execution_success/constant_return/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/constant_return/src/main.nr rename to crates/nargo_cli/tests/execution_success/constant_return/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/constant_return/target/constant_return.json b/crates/nargo_cli/tests/execution_success/constant_return/target/constant_return.json similarity index 100% rename from crates/nargo_cli/tests/test_data/constant_return/target/constant_return.json rename to crates/nargo_cli/tests/execution_success/constant_return/target/constant_return.json diff --git a/crates/nargo_cli/tests/test_data/constant_return/target/witness.tr b/crates/nargo_cli/tests/execution_success/constant_return/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/constant_return/target/witness.tr rename to crates/nargo_cli/tests/execution_success/constant_return/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/contracts/Nargo.toml b/crates/nargo_cli/tests/execution_success/contracts/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/contracts/Nargo.toml rename to crates/nargo_cli/tests/execution_success/contracts/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/contracts/Prover.toml b/crates/nargo_cli/tests/execution_success/contracts/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/contracts/Prover.toml rename to crates/nargo_cli/tests/execution_success/contracts/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/contracts/src/main.nr b/crates/nargo_cli/tests/execution_success/contracts/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/contracts/src/main.nr rename to crates/nargo_cli/tests/execution_success/contracts/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/contracts/target/contracts.json b/crates/nargo_cli/tests/execution_success/contracts/target/contracts.json similarity index 100% rename from crates/nargo_cli/tests/test_data/contracts/target/contracts.json rename to crates/nargo_cli/tests/execution_success/contracts/target/contracts.json diff --git a/crates/nargo_cli/tests/test_data/contracts/target/witness.tr b/crates/nargo_cli/tests/execution_success/contracts/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/contracts/target/witness.tr rename to crates/nargo_cli/tests/execution_success/contracts/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/custom_entry/Nargo.toml b/crates/nargo_cli/tests/execution_success/custom_entry/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/custom_entry/Nargo.toml rename to crates/nargo_cli/tests/execution_success/custom_entry/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/custom_entry_not_found/Prover.toml b/crates/nargo_cli/tests/execution_success/custom_entry/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/custom_entry_not_found/Prover.toml rename to crates/nargo_cli/tests/execution_success/custom_entry/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/custom_entry/src/foobarbaz.nr b/crates/nargo_cli/tests/execution_success/custom_entry/src/foobarbaz.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/custom_entry/src/foobarbaz.nr rename to crates/nargo_cli/tests/execution_success/custom_entry/src/foobarbaz.nr diff --git a/crates/nargo_cli/tests/test_data/custom_entry/target/custom_entry.json b/crates/nargo_cli/tests/execution_success/custom_entry/target/custom_entry.json similarity index 100% rename from crates/nargo_cli/tests/test_data/custom_entry/target/custom_entry.json rename to crates/nargo_cli/tests/execution_success/custom_entry/target/custom_entry.json diff --git a/crates/nargo_cli/tests/test_data/custom_entry/target/witness.tr b/crates/nargo_cli/tests/execution_success/custom_entry/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/custom_entry/target/witness.tr rename to crates/nargo_cli/tests/execution_success/custom_entry/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/debug_logs/Nargo.toml b/crates/nargo_cli/tests/execution_success/debug_logs/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/debug_logs/Nargo.toml rename to crates/nargo_cli/tests/execution_success/debug_logs/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/debug_logs/Prover.toml b/crates/nargo_cli/tests/execution_success/debug_logs/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/debug_logs/Prover.toml rename to crates/nargo_cli/tests/execution_success/debug_logs/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/debug_logs/src/main.nr b/crates/nargo_cli/tests/execution_success/debug_logs/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/debug_logs/src/main.nr rename to crates/nargo_cli/tests/execution_success/debug_logs/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/debug_logs/target/debug_logs.json b/crates/nargo_cli/tests/execution_success/debug_logs/target/debug_logs.json similarity index 100% rename from crates/nargo_cli/tests/test_data/debug_logs/target/debug_logs.json rename to crates/nargo_cli/tests/execution_success/debug_logs/target/debug_logs.json diff --git a/crates/nargo_cli/tests/test_data/debug_logs/target/witness.tr b/crates/nargo_cli/tests/execution_success/debug_logs/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/debug_logs/target/witness.tr rename to crates/nargo_cli/tests/execution_success/debug_logs/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/diamond_deps_0/Nargo.toml b/crates/nargo_cli/tests/execution_success/diamond_deps_0/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/diamond_deps_0/Nargo.toml rename to crates/nargo_cli/tests/execution_success/diamond_deps_0/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/diamond_deps_0/Prover.toml b/crates/nargo_cli/tests/execution_success/diamond_deps_0/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/diamond_deps_0/Prover.toml rename to crates/nargo_cli/tests/execution_success/diamond_deps_0/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/diamond_deps_0/src/main.nr b/crates/nargo_cli/tests/execution_success/diamond_deps_0/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/diamond_deps_0/src/main.nr rename to crates/nargo_cli/tests/execution_success/diamond_deps_0/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/diamond_deps_0/target/diamond_deps_0.json b/crates/nargo_cli/tests/execution_success/diamond_deps_0/target/diamond_deps_0.json similarity index 100% rename from crates/nargo_cli/tests/test_data/diamond_deps_0/target/diamond_deps_0.json rename to crates/nargo_cli/tests/execution_success/diamond_deps_0/target/diamond_deps_0.json diff --git a/crates/nargo_cli/tests/test_data/diamond_deps_0/target/witness.tr b/crates/nargo_cli/tests/execution_success/diamond_deps_0/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/diamond_deps_0/target/witness.tr rename to crates/nargo_cli/tests/execution_success/diamond_deps_0/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/distinct_keyword/Nargo.toml b/crates/nargo_cli/tests/execution_success/distinct_keyword/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/distinct_keyword/Nargo.toml rename to crates/nargo_cli/tests/execution_success/distinct_keyword/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/distinct_keyword/Prover.toml b/crates/nargo_cli/tests/execution_success/distinct_keyword/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/distinct_keyword/Prover.toml rename to crates/nargo_cli/tests/execution_success/distinct_keyword/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/distinct_keyword/src/main.nr b/crates/nargo_cli/tests/execution_success/distinct_keyword/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/distinct_keyword/src/main.nr rename to crates/nargo_cli/tests/execution_success/distinct_keyword/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/distinct_keyword/target/distinct_keyword.json b/crates/nargo_cli/tests/execution_success/distinct_keyword/target/distinct_keyword.json similarity index 100% rename from crates/nargo_cli/tests/test_data/distinct_keyword/target/distinct_keyword.json rename to crates/nargo_cli/tests/execution_success/distinct_keyword/target/distinct_keyword.json diff --git a/crates/nargo_cli/tests/test_data/distinct_keyword/target/witness.tr b/crates/nargo_cli/tests/execution_success/distinct_keyword/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/distinct_keyword/target/witness.tr rename to crates/nargo_cli/tests/execution_success/distinct_keyword/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/ecdsa_secp256k1/Nargo.toml b/crates/nargo_cli/tests/execution_success/ecdsa_secp256k1/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/ecdsa_secp256k1/Nargo.toml rename to crates/nargo_cli/tests/execution_success/ecdsa_secp256k1/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/ecdsa_secp256k1/Prover.toml b/crates/nargo_cli/tests/execution_success/ecdsa_secp256k1/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/ecdsa_secp256k1/Prover.toml rename to crates/nargo_cli/tests/execution_success/ecdsa_secp256k1/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/ecdsa_secp256k1/src/main.nr b/crates/nargo_cli/tests/execution_success/ecdsa_secp256k1/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/ecdsa_secp256k1/src/main.nr rename to crates/nargo_cli/tests/execution_success/ecdsa_secp256k1/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/ecdsa_secp256k1/target/ecdsa_secp256k1.json b/crates/nargo_cli/tests/execution_success/ecdsa_secp256k1/target/ecdsa_secp256k1.json similarity index 100% rename from crates/nargo_cli/tests/test_data/ecdsa_secp256k1/target/ecdsa_secp256k1.json rename to crates/nargo_cli/tests/execution_success/ecdsa_secp256k1/target/ecdsa_secp256k1.json diff --git a/crates/nargo_cli/tests/test_data/ecdsa_secp256k1/target/witness.tr b/crates/nargo_cli/tests/execution_success/ecdsa_secp256k1/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/ecdsa_secp256k1/target/witness.tr rename to crates/nargo_cli/tests/execution_success/ecdsa_secp256k1/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/ecdsa_secp256r1/Nargo.toml b/crates/nargo_cli/tests/execution_success/ecdsa_secp256r1/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/ecdsa_secp256r1/Nargo.toml rename to crates/nargo_cli/tests/execution_success/ecdsa_secp256r1/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/ecdsa_secp256r1/Prover.toml b/crates/nargo_cli/tests/execution_success/ecdsa_secp256r1/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/ecdsa_secp256r1/Prover.toml rename to crates/nargo_cli/tests/execution_success/ecdsa_secp256r1/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/ecdsa_secp256r1/src/main.nr b/crates/nargo_cli/tests/execution_success/ecdsa_secp256r1/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/ecdsa_secp256r1/src/main.nr rename to crates/nargo_cli/tests/execution_success/ecdsa_secp256r1/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/ecdsa_secp256r1/target/ecdsa_secp256r1.json b/crates/nargo_cli/tests/execution_success/ecdsa_secp256r1/target/ecdsa_secp256r1.json similarity index 100% rename from crates/nargo_cli/tests/test_data/ecdsa_secp256r1/target/ecdsa_secp256r1.json rename to crates/nargo_cli/tests/execution_success/ecdsa_secp256r1/target/ecdsa_secp256r1.json diff --git a/crates/nargo_cli/tests/test_data/ecdsa_secp256r1/target/witness.tr b/crates/nargo_cli/tests/execution_success/ecdsa_secp256r1/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/ecdsa_secp256r1/target/witness.tr rename to crates/nargo_cli/tests/execution_success/ecdsa_secp256r1/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/generics/Nargo.toml b/crates/nargo_cli/tests/execution_success/generics/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/generics/Nargo.toml rename to crates/nargo_cli/tests/execution_success/generics/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/generics/Prover.toml b/crates/nargo_cli/tests/execution_success/generics/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/generics/Prover.toml rename to crates/nargo_cli/tests/execution_success/generics/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/generics/src/main.nr b/crates/nargo_cli/tests/execution_success/generics/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/generics/src/main.nr rename to crates/nargo_cli/tests/execution_success/generics/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/generics/target/generics.json b/crates/nargo_cli/tests/execution_success/generics/target/generics.json similarity index 100% rename from crates/nargo_cli/tests/test_data/generics/target/generics.json rename to crates/nargo_cli/tests/execution_success/generics/target/generics.json diff --git a/crates/nargo_cli/tests/test_data/generics/target/witness.tr b/crates/nargo_cli/tests/execution_success/generics/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/generics/target/witness.tr rename to crates/nargo_cli/tests/execution_success/generics/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/global_consts/Nargo.toml b/crates/nargo_cli/tests/execution_success/global_consts/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/global_consts/Nargo.toml rename to crates/nargo_cli/tests/execution_success/global_consts/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/global_consts/Prover.toml b/crates/nargo_cli/tests/execution_success/global_consts/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/global_consts/Prover.toml rename to crates/nargo_cli/tests/execution_success/global_consts/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/global_consts/src/baz.nr b/crates/nargo_cli/tests/execution_success/global_consts/src/baz.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/global_consts/src/baz.nr rename to crates/nargo_cli/tests/execution_success/global_consts/src/baz.nr diff --git a/crates/nargo_cli/tests/test_data/global_consts/src/foo.nr b/crates/nargo_cli/tests/execution_success/global_consts/src/foo.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/global_consts/src/foo.nr rename to crates/nargo_cli/tests/execution_success/global_consts/src/foo.nr diff --git a/crates/nargo_cli/tests/test_data/global_consts/src/foo/bar.nr b/crates/nargo_cli/tests/execution_success/global_consts/src/foo/bar.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/global_consts/src/foo/bar.nr rename to crates/nargo_cli/tests/execution_success/global_consts/src/foo/bar.nr diff --git a/crates/nargo_cli/tests/test_data/global_consts/src/main.nr b/crates/nargo_cli/tests/execution_success/global_consts/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/global_consts/src/main.nr rename to crates/nargo_cli/tests/execution_success/global_consts/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/global_consts/target/global_consts.json b/crates/nargo_cli/tests/execution_success/global_consts/target/global_consts.json similarity index 100% rename from crates/nargo_cli/tests/test_data/global_consts/target/global_consts.json rename to crates/nargo_cli/tests/execution_success/global_consts/target/global_consts.json diff --git a/crates/nargo_cli/tests/test_data/global_consts/target/witness.tr b/crates/nargo_cli/tests/execution_success/global_consts/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/global_consts/target/witness.tr rename to crates/nargo_cli/tests/execution_success/global_consts/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/hash_to_field/Nargo.toml b/crates/nargo_cli/tests/execution_success/hash_to_field/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/hash_to_field/Nargo.toml rename to crates/nargo_cli/tests/execution_success/hash_to_field/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/hash_to_field/Prover.toml b/crates/nargo_cli/tests/execution_success/hash_to_field/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/hash_to_field/Prover.toml rename to crates/nargo_cli/tests/execution_success/hash_to_field/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/hash_to_field/src/main.nr b/crates/nargo_cli/tests/execution_success/hash_to_field/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/hash_to_field/src/main.nr rename to crates/nargo_cli/tests/execution_success/hash_to_field/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/hash_to_field/target/hash_to_field.json b/crates/nargo_cli/tests/execution_success/hash_to_field/target/hash_to_field.json similarity index 100% rename from crates/nargo_cli/tests/test_data/hash_to_field/target/hash_to_field.json rename to crates/nargo_cli/tests/execution_success/hash_to_field/target/hash_to_field.json diff --git a/crates/nargo_cli/tests/test_data/hash_to_field/target/witness.tr b/crates/nargo_cli/tests/execution_success/hash_to_field/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/hash_to_field/target/witness.tr rename to crates/nargo_cli/tests/execution_success/hash_to_field/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/higher_order_functions/Nargo.toml b/crates/nargo_cli/tests/execution_success/higher_order_functions/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/higher_order_functions/Nargo.toml rename to crates/nargo_cli/tests/execution_success/higher_order_functions/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/numeric_generics/Prover.toml b/crates/nargo_cli/tests/execution_success/higher_order_functions/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/numeric_generics/Prover.toml rename to crates/nargo_cli/tests/execution_success/higher_order_functions/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/higher_order_functions/src/main.nr b/crates/nargo_cli/tests/execution_success/higher_order_functions/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/higher_order_functions/src/main.nr rename to crates/nargo_cli/tests/execution_success/higher_order_functions/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/higher_order_functions/target/higher_order_functions.json b/crates/nargo_cli/tests/execution_success/higher_order_functions/target/higher_order_functions.json similarity index 100% rename from crates/nargo_cli/tests/test_data/higher_order_functions/target/higher_order_functions.json rename to crates/nargo_cli/tests/execution_success/higher_order_functions/target/higher_order_functions.json diff --git a/crates/nargo_cli/tests/test_data/higher_order_functions/target/witness.tr b/crates/nargo_cli/tests/execution_success/higher_order_functions/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/higher_order_functions/target/witness.tr rename to crates/nargo_cli/tests/execution_success/higher_order_functions/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/if_else_chain/Nargo.toml b/crates/nargo_cli/tests/execution_success/if_else_chain/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/if_else_chain/Nargo.toml rename to crates/nargo_cli/tests/execution_success/if_else_chain/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/if_else_chain/Prover.toml b/crates/nargo_cli/tests/execution_success/if_else_chain/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/if_else_chain/Prover.toml rename to crates/nargo_cli/tests/execution_success/if_else_chain/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/if_else_chain/src/main.nr b/crates/nargo_cli/tests/execution_success/if_else_chain/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/if_else_chain/src/main.nr rename to crates/nargo_cli/tests/execution_success/if_else_chain/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/if_else_chain/target/if_else_chain.json b/crates/nargo_cli/tests/execution_success/if_else_chain/target/if_else_chain.json similarity index 100% rename from crates/nargo_cli/tests/test_data/if_else_chain/target/if_else_chain.json rename to crates/nargo_cli/tests/execution_success/if_else_chain/target/if_else_chain.json diff --git a/crates/nargo_cli/tests/test_data/if_else_chain/target/witness.tr b/crates/nargo_cli/tests/execution_success/if_else_chain/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/if_else_chain/target/witness.tr rename to crates/nargo_cli/tests/execution_success/if_else_chain/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/integer_array_indexing/Nargo.toml b/crates/nargo_cli/tests/execution_success/integer_array_indexing/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/integer_array_indexing/Nargo.toml rename to crates/nargo_cli/tests/execution_success/integer_array_indexing/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/integer_array_indexing/Prover.toml b/crates/nargo_cli/tests/execution_success/integer_array_indexing/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/integer_array_indexing/Prover.toml rename to crates/nargo_cli/tests/execution_success/integer_array_indexing/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/integer_array_indexing/src/main.nr b/crates/nargo_cli/tests/execution_success/integer_array_indexing/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/integer_array_indexing/src/main.nr rename to crates/nargo_cli/tests/execution_success/integer_array_indexing/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/integer_array_indexing/target/integer_array_indexing.json b/crates/nargo_cli/tests/execution_success/integer_array_indexing/target/integer_array_indexing.json similarity index 100% rename from crates/nargo_cli/tests/test_data/integer_array_indexing/target/integer_array_indexing.json rename to crates/nargo_cli/tests/execution_success/integer_array_indexing/target/integer_array_indexing.json diff --git a/crates/nargo_cli/tests/test_data/integer_array_indexing/target/witness.tr b/crates/nargo_cli/tests/execution_success/integer_array_indexing/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/integer_array_indexing/target/witness.tr rename to crates/nargo_cli/tests/execution_success/integer_array_indexing/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/keccak256/Nargo.toml b/crates/nargo_cli/tests/execution_success/keccak256/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/keccak256/Nargo.toml rename to crates/nargo_cli/tests/execution_success/keccak256/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/keccak256/Prover.toml b/crates/nargo_cli/tests/execution_success/keccak256/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/keccak256/Prover.toml rename to crates/nargo_cli/tests/execution_success/keccak256/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/keccak256/src/main.nr b/crates/nargo_cli/tests/execution_success/keccak256/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/keccak256/src/main.nr rename to crates/nargo_cli/tests/execution_success/keccak256/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/keccak256/target/keccak256.json b/crates/nargo_cli/tests/execution_success/keccak256/target/keccak256.json similarity index 100% rename from crates/nargo_cli/tests/test_data/keccak256/target/keccak256.json rename to crates/nargo_cli/tests/execution_success/keccak256/target/keccak256.json diff --git a/crates/nargo_cli/tests/test_data/keccak256/target/witness.tr b/crates/nargo_cli/tests/execution_success/keccak256/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/keccak256/target/witness.tr rename to crates/nargo_cli/tests/execution_success/keccak256/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/main_bool_arg/Nargo.toml b/crates/nargo_cli/tests/execution_success/main_bool_arg/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/main_bool_arg/Nargo.toml rename to crates/nargo_cli/tests/execution_success/main_bool_arg/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/main_bool_arg/Prover.toml b/crates/nargo_cli/tests/execution_success/main_bool_arg/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/main_bool_arg/Prover.toml rename to crates/nargo_cli/tests/execution_success/main_bool_arg/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/main_bool_arg/src/main.nr b/crates/nargo_cli/tests/execution_success/main_bool_arg/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/main_bool_arg/src/main.nr rename to crates/nargo_cli/tests/execution_success/main_bool_arg/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/main_bool_arg/target/main_bool_arg.json b/crates/nargo_cli/tests/execution_success/main_bool_arg/target/main_bool_arg.json similarity index 100% rename from crates/nargo_cli/tests/test_data/main_bool_arg/target/main_bool_arg.json rename to crates/nargo_cli/tests/execution_success/main_bool_arg/target/main_bool_arg.json diff --git a/crates/nargo_cli/tests/test_data/main_bool_arg/target/witness.tr b/crates/nargo_cli/tests/execution_success/main_bool_arg/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/main_bool_arg/target/witness.tr rename to crates/nargo_cli/tests/execution_success/main_bool_arg/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/main_return/Nargo.toml b/crates/nargo_cli/tests/execution_success/main_return/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/main_return/Nargo.toml rename to crates/nargo_cli/tests/execution_success/main_return/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/main_return/Prover.toml b/crates/nargo_cli/tests/execution_success/main_return/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/main_return/Prover.toml rename to crates/nargo_cli/tests/execution_success/main_return/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/main_return/src/main.nr b/crates/nargo_cli/tests/execution_success/main_return/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/main_return/src/main.nr rename to crates/nargo_cli/tests/execution_success/main_return/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/main_return/target/main_return.json b/crates/nargo_cli/tests/execution_success/main_return/target/main_return.json similarity index 100% rename from crates/nargo_cli/tests/test_data/main_return/target/main_return.json rename to crates/nargo_cli/tests/execution_success/main_return/target/main_return.json diff --git a/crates/nargo_cli/tests/test_data/main_return/target/witness.tr b/crates/nargo_cli/tests/execution_success/main_return/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/main_return/target/witness.tr rename to crates/nargo_cli/tests/execution_success/main_return/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/merkle_insert/Nargo.toml b/crates/nargo_cli/tests/execution_success/merkle_insert/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/merkle_insert/Nargo.toml rename to crates/nargo_cli/tests/execution_success/merkle_insert/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/merkle_insert/Prover.toml b/crates/nargo_cli/tests/execution_success/merkle_insert/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/merkle_insert/Prover.toml rename to crates/nargo_cli/tests/execution_success/merkle_insert/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/merkle_insert/src/main.nr b/crates/nargo_cli/tests/execution_success/merkle_insert/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/merkle_insert/src/main.nr rename to crates/nargo_cli/tests/execution_success/merkle_insert/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/merkle_insert/target/merkle_insert.json b/crates/nargo_cli/tests/execution_success/merkle_insert/target/merkle_insert.json similarity index 100% rename from crates/nargo_cli/tests/test_data/merkle_insert/target/merkle_insert.json rename to crates/nargo_cli/tests/execution_success/merkle_insert/target/merkle_insert.json diff --git a/crates/nargo_cli/tests/test_data/merkle_insert/target/witness.tr b/crates/nargo_cli/tests/execution_success/merkle_insert/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/merkle_insert/target/witness.tr rename to crates/nargo_cli/tests/execution_success/merkle_insert/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/modules/Nargo.toml b/crates/nargo_cli/tests/execution_success/modules/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/modules/Nargo.toml rename to crates/nargo_cli/tests/execution_success/modules/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/modules/Prover.toml b/crates/nargo_cli/tests/execution_success/modules/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/modules/Prover.toml rename to crates/nargo_cli/tests/execution_success/modules/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/modules/src/foo.nr b/crates/nargo_cli/tests/execution_success/modules/src/foo.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/modules/src/foo.nr rename to crates/nargo_cli/tests/execution_success/modules/src/foo.nr diff --git a/crates/nargo_cli/tests/test_data/modules/src/main.nr b/crates/nargo_cli/tests/execution_success/modules/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/modules/src/main.nr rename to crates/nargo_cli/tests/execution_success/modules/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/modules/target/modules.json b/crates/nargo_cli/tests/execution_success/modules/target/modules.json similarity index 100% rename from crates/nargo_cli/tests/test_data/modules/target/modules.json rename to crates/nargo_cli/tests/execution_success/modules/target/modules.json diff --git a/crates/nargo_cli/tests/test_data/modules/target/witness.tr b/crates/nargo_cli/tests/execution_success/modules/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/modules/target/witness.tr rename to crates/nargo_cli/tests/execution_success/modules/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/modules_more/Nargo.toml b/crates/nargo_cli/tests/execution_success/modules_more/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/modules_more/Nargo.toml rename to crates/nargo_cli/tests/execution_success/modules_more/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/modules_more/Prover.toml b/crates/nargo_cli/tests/execution_success/modules_more/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/modules_more/Prover.toml rename to crates/nargo_cli/tests/execution_success/modules_more/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/modules_more/src/foo.nr b/crates/nargo_cli/tests/execution_success/modules_more/src/foo.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/modules_more/src/foo.nr rename to crates/nargo_cli/tests/execution_success/modules_more/src/foo.nr diff --git a/crates/nargo_cli/tests/test_data/modules_more/src/foo/bar.nr b/crates/nargo_cli/tests/execution_success/modules_more/src/foo/bar.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/modules_more/src/foo/bar.nr rename to crates/nargo_cli/tests/execution_success/modules_more/src/foo/bar.nr diff --git a/crates/nargo_cli/tests/test_data/modules_more/src/main.nr b/crates/nargo_cli/tests/execution_success/modules_more/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/modules_more/src/main.nr rename to crates/nargo_cli/tests/execution_success/modules_more/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/modules_more/target/modules_more.json b/crates/nargo_cli/tests/execution_success/modules_more/target/modules_more.json similarity index 100% rename from crates/nargo_cli/tests/test_data/modules_more/target/modules_more.json rename to crates/nargo_cli/tests/execution_success/modules_more/target/modules_more.json diff --git a/crates/nargo_cli/tests/test_data/modules_more/target/witness.tr b/crates/nargo_cli/tests/execution_success/modules_more/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/modules_more/target/witness.tr rename to crates/nargo_cli/tests/execution_success/modules_more/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/modulus/Nargo.toml b/crates/nargo_cli/tests/execution_success/modulus/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/modulus/Nargo.toml rename to crates/nargo_cli/tests/execution_success/modulus/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/modulus/Prover.toml b/crates/nargo_cli/tests/execution_success/modulus/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/modulus/Prover.toml rename to crates/nargo_cli/tests/execution_success/modulus/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/modulus/src/main.nr b/crates/nargo_cli/tests/execution_success/modulus/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/modulus/src/main.nr rename to crates/nargo_cli/tests/execution_success/modulus/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/modulus/target/modulus.json b/crates/nargo_cli/tests/execution_success/modulus/target/modulus.json similarity index 100% rename from crates/nargo_cli/tests/test_data/modulus/target/modulus.json rename to crates/nargo_cli/tests/execution_success/modulus/target/modulus.json diff --git a/crates/nargo_cli/tests/test_data/modulus/target/witness.tr b/crates/nargo_cli/tests/execution_success/modulus/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/modulus/target/witness.tr rename to crates/nargo_cli/tests/execution_success/modulus/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/nested_arrays_from_brillig/Nargo.toml b/crates/nargo_cli/tests/execution_success/nested_arrays_from_brillig/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/nested_arrays_from_brillig/Nargo.toml rename to crates/nargo_cli/tests/execution_success/nested_arrays_from_brillig/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/nested_arrays_from_brillig/Prover.toml b/crates/nargo_cli/tests/execution_success/nested_arrays_from_brillig/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/nested_arrays_from_brillig/Prover.toml rename to crates/nargo_cli/tests/execution_success/nested_arrays_from_brillig/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/nested_arrays_from_brillig/src/main.nr b/crates/nargo_cli/tests/execution_success/nested_arrays_from_brillig/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/nested_arrays_from_brillig/src/main.nr rename to crates/nargo_cli/tests/execution_success/nested_arrays_from_brillig/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/nested_arrays_from_brillig/target/nested_arrays_from_brillig.json b/crates/nargo_cli/tests/execution_success/nested_arrays_from_brillig/target/nested_arrays_from_brillig.json similarity index 100% rename from crates/nargo_cli/tests/test_data/nested_arrays_from_brillig/target/nested_arrays_from_brillig.json rename to crates/nargo_cli/tests/execution_success/nested_arrays_from_brillig/target/nested_arrays_from_brillig.json diff --git a/crates/nargo_cli/tests/test_data/nested_arrays_from_brillig/target/witness.tr b/crates/nargo_cli/tests/execution_success/nested_arrays_from_brillig/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/nested_arrays_from_brillig/target/witness.tr rename to crates/nargo_cli/tests/execution_success/nested_arrays_from_brillig/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/pedersen_check/Nargo.toml b/crates/nargo_cli/tests/execution_success/pedersen_check/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/pedersen_check/Nargo.toml rename to crates/nargo_cli/tests/execution_success/pedersen_check/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/pedersen_check/Prover.toml b/crates/nargo_cli/tests/execution_success/pedersen_check/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/pedersen_check/Prover.toml rename to crates/nargo_cli/tests/execution_success/pedersen_check/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/pedersen_check/src/main.nr b/crates/nargo_cli/tests/execution_success/pedersen_check/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/pedersen_check/src/main.nr rename to crates/nargo_cli/tests/execution_success/pedersen_check/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/pedersen_check/target/pedersen_check.json b/crates/nargo_cli/tests/execution_success/pedersen_check/target/pedersen_check.json similarity index 100% rename from crates/nargo_cli/tests/test_data/pedersen_check/target/pedersen_check.json rename to crates/nargo_cli/tests/execution_success/pedersen_check/target/pedersen_check.json diff --git a/crates/nargo_cli/tests/test_data/pedersen_check/target/witness.tr b/crates/nargo_cli/tests/execution_success/pedersen_check/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/pedersen_check/target/witness.tr rename to crates/nargo_cli/tests/execution_success/pedersen_check/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/poseidon_bn254_hash/Nargo.toml b/crates/nargo_cli/tests/execution_success/poseidon_bn254_hash/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/poseidon_bn254_hash/Nargo.toml rename to crates/nargo_cli/tests/execution_success/poseidon_bn254_hash/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/poseidon_bn254_hash/Prover.toml b/crates/nargo_cli/tests/execution_success/poseidon_bn254_hash/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/poseidon_bn254_hash/Prover.toml rename to crates/nargo_cli/tests/execution_success/poseidon_bn254_hash/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/poseidon_bn254_hash/src/main.nr b/crates/nargo_cli/tests/execution_success/poseidon_bn254_hash/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/poseidon_bn254_hash/src/main.nr rename to crates/nargo_cli/tests/execution_success/poseidon_bn254_hash/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/poseidon_bn254_hash/target/poseidon_bn254_hash.json b/crates/nargo_cli/tests/execution_success/poseidon_bn254_hash/target/poseidon_bn254_hash.json similarity index 100% rename from crates/nargo_cli/tests/test_data/poseidon_bn254_hash/target/poseidon_bn254_hash.json rename to crates/nargo_cli/tests/execution_success/poseidon_bn254_hash/target/poseidon_bn254_hash.json diff --git a/crates/nargo_cli/tests/test_data/poseidon_bn254_hash/target/witness.tr b/crates/nargo_cli/tests/execution_success/poseidon_bn254_hash/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/poseidon_bn254_hash/target/witness.tr rename to crates/nargo_cli/tests/execution_success/poseidon_bn254_hash/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/poseidonsponge_x5_254/Nargo.toml b/crates/nargo_cli/tests/execution_success/poseidonsponge_x5_254/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/poseidonsponge_x5_254/Nargo.toml rename to crates/nargo_cli/tests/execution_success/poseidonsponge_x5_254/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/poseidonsponge_x5_254/Prover.toml b/crates/nargo_cli/tests/execution_success/poseidonsponge_x5_254/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/poseidonsponge_x5_254/Prover.toml rename to crates/nargo_cli/tests/execution_success/poseidonsponge_x5_254/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/poseidonsponge_x5_254/src/main.nr b/crates/nargo_cli/tests/execution_success/poseidonsponge_x5_254/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/poseidonsponge_x5_254/src/main.nr rename to crates/nargo_cli/tests/execution_success/poseidonsponge_x5_254/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/poseidonsponge_x5_254/target/poseidonsponge_x5_254.json b/crates/nargo_cli/tests/execution_success/poseidonsponge_x5_254/target/poseidonsponge_x5_254.json similarity index 100% rename from crates/nargo_cli/tests/test_data/poseidonsponge_x5_254/target/poseidonsponge_x5_254.json rename to crates/nargo_cli/tests/execution_success/poseidonsponge_x5_254/target/poseidonsponge_x5_254.json diff --git a/crates/nargo_cli/tests/test_data/poseidonsponge_x5_254/target/witness.tr b/crates/nargo_cli/tests/execution_success/poseidonsponge_x5_254/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/poseidonsponge_x5_254/target/witness.tr rename to crates/nargo_cli/tests/execution_success/poseidonsponge_x5_254/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/pred_eq/Nargo.toml b/crates/nargo_cli/tests/execution_success/pred_eq/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/pred_eq/Nargo.toml rename to crates/nargo_cli/tests/execution_success/pred_eq/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/workspace/crates/a/Prover.toml b/crates/nargo_cli/tests/execution_success/pred_eq/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace/crates/a/Prover.toml rename to crates/nargo_cli/tests/execution_success/pred_eq/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/pred_eq/src/main.nr b/crates/nargo_cli/tests/execution_success/pred_eq/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/pred_eq/src/main.nr rename to crates/nargo_cli/tests/execution_success/pred_eq/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/pred_eq/target/pred_eq.json b/crates/nargo_cli/tests/execution_success/pred_eq/target/pred_eq.json similarity index 100% rename from crates/nargo_cli/tests/test_data/pred_eq/target/pred_eq.json rename to crates/nargo_cli/tests/execution_success/pred_eq/target/pred_eq.json diff --git a/crates/nargo_cli/tests/test_data/pred_eq/target/witness.tr b/crates/nargo_cli/tests/execution_success/pred_eq/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/pred_eq/target/witness.tr rename to crates/nargo_cli/tests/execution_success/pred_eq/target/witness.tr diff --git a/crates/nargo_cli/tests/execution_success/rebuild.sh b/crates/nargo_cli/tests/execution_success/rebuild.sh new file mode 100755 index 00000000000..139660e501d --- /dev/null +++ b/crates/nargo_cli/tests/execution_success/rebuild.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -e + +excluded_dirs=("workspace") + +# Loop over every directory +for dir in ./*; do + if [[ ! -d $dir ]]; then + continue + fi + + dir_name=$(basename "$dir") + if [[ ! " ${excluded_dirs[@]} " =~ " ${dir_name} " ]]; then + cd $dir + if [ -d ./target/ ]; then + rm -r ./target/ + fi + nargo compile && nargo execute witness + cd .. + fi +done + diff --git a/crates/nargo_cli/tests/test_data/references/Nargo.toml b/crates/nargo_cli/tests/execution_success/references/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/references/Nargo.toml rename to crates/nargo_cli/tests/execution_success/references/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/references/Prover.toml b/crates/nargo_cli/tests/execution_success/references/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/references/Prover.toml rename to crates/nargo_cli/tests/execution_success/references/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/references/src/main.nr b/crates/nargo_cli/tests/execution_success/references/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/references/src/main.nr rename to crates/nargo_cli/tests/execution_success/references/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/references/target/references.json b/crates/nargo_cli/tests/execution_success/references/target/references.json similarity index 100% rename from crates/nargo_cli/tests/test_data/references/target/references.json rename to crates/nargo_cli/tests/execution_success/references/target/references.json diff --git a/crates/nargo_cli/tests/test_data/references/target/witness.tr b/crates/nargo_cli/tests/execution_success/references/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/references/target/witness.tr rename to crates/nargo_cli/tests/execution_success/references/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/regression/Nargo.toml b/crates/nargo_cli/tests/execution_success/regression/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/regression/Nargo.toml rename to crates/nargo_cli/tests/execution_success/regression/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/regression/Prover.toml b/crates/nargo_cli/tests/execution_success/regression/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/regression/Prover.toml rename to crates/nargo_cli/tests/execution_success/regression/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/regression/src/main.nr b/crates/nargo_cli/tests/execution_success/regression/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/regression/src/main.nr rename to crates/nargo_cli/tests/execution_success/regression/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/regression/target/regression.json b/crates/nargo_cli/tests/execution_success/regression/target/regression.json similarity index 100% rename from crates/nargo_cli/tests/test_data/regression/target/regression.json rename to crates/nargo_cli/tests/execution_success/regression/target/regression.json diff --git a/crates/nargo_cli/tests/test_data/regression/target/witness.tr b/crates/nargo_cli/tests/execution_success/regression/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/regression/target/witness.tr rename to crates/nargo_cli/tests/execution_success/regression/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/regression_2099/Nargo.toml b/crates/nargo_cli/tests/execution_success/regression_2099/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/regression_2099/Nargo.toml rename to crates/nargo_cli/tests/execution_success/regression_2099/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/regression_2099/src/main.nr b/crates/nargo_cli/tests/execution_success/regression_2099/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/regression_2099/src/main.nr rename to crates/nargo_cli/tests/execution_success/regression_2099/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/regression_2099/target/regression_2099.json b/crates/nargo_cli/tests/execution_success/regression_2099/target/regression_2099.json similarity index 100% rename from crates/nargo_cli/tests/test_data/regression_2099/target/regression_2099.json rename to crates/nargo_cli/tests/execution_success/regression_2099/target/regression_2099.json diff --git a/crates/nargo_cli/tests/test_data/ec_baby_jubjub/target/witness.tr b/crates/nargo_cli/tests/execution_success/regression_2099/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/ec_baby_jubjub/target/witness.tr rename to crates/nargo_cli/tests/execution_success/regression_2099/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/regression_method_cannot_be_found/Nargo.toml b/crates/nargo_cli/tests/execution_success/regression_method_cannot_be_found/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/regression_method_cannot_be_found/Nargo.toml rename to crates/nargo_cli/tests/execution_success/regression_method_cannot_be_found/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/regression_method_cannot_be_found/Prover.toml b/crates/nargo_cli/tests/execution_success/regression_method_cannot_be_found/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/regression_method_cannot_be_found/Prover.toml rename to crates/nargo_cli/tests/execution_success/regression_method_cannot_be_found/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/regression_method_cannot_be_found/src/main.nr b/crates/nargo_cli/tests/execution_success/regression_method_cannot_be_found/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/regression_method_cannot_be_found/src/main.nr rename to crates/nargo_cli/tests/execution_success/regression_method_cannot_be_found/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/regression_method_cannot_be_found/target/regression_method_cannot_be_found.json b/crates/nargo_cli/tests/execution_success/regression_method_cannot_be_found/target/regression_method_cannot_be_found.json similarity index 100% rename from crates/nargo_cli/tests/test_data/regression_method_cannot_be_found/target/regression_method_cannot_be_found.json rename to crates/nargo_cli/tests/execution_success/regression_method_cannot_be_found/target/regression_method_cannot_be_found.json diff --git a/crates/nargo_cli/tests/test_data/higher_order_fn_selector/target/witness.tr b/crates/nargo_cli/tests/execution_success/regression_method_cannot_be_found/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/higher_order_fn_selector/target/witness.tr rename to crates/nargo_cli/tests/execution_success/regression_method_cannot_be_found/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/ret_fn_ret_cl/Nargo.toml b/crates/nargo_cli/tests/execution_success/ret_fn_ret_cl/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/ret_fn_ret_cl/Nargo.toml rename to crates/nargo_cli/tests/execution_success/ret_fn_ret_cl/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/ret_fn_ret_cl/Prover.toml b/crates/nargo_cli/tests/execution_success/ret_fn_ret_cl/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/ret_fn_ret_cl/Prover.toml rename to crates/nargo_cli/tests/execution_success/ret_fn_ret_cl/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/ret_fn_ret_cl/src/main.nr b/crates/nargo_cli/tests/execution_success/ret_fn_ret_cl/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/ret_fn_ret_cl/src/main.nr rename to crates/nargo_cli/tests/execution_success/ret_fn_ret_cl/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/ret_fn_ret_cl/target/ret_fn_ret_cl.json b/crates/nargo_cli/tests/execution_success/ret_fn_ret_cl/target/ret_fn_ret_cl.json similarity index 100% rename from crates/nargo_cli/tests/test_data/ret_fn_ret_cl/target/ret_fn_ret_cl.json rename to crates/nargo_cli/tests/execution_success/ret_fn_ret_cl/target/ret_fn_ret_cl.json diff --git a/crates/nargo_cli/tests/test_data/ret_fn_ret_cl/target/witness.tr b/crates/nargo_cli/tests/execution_success/ret_fn_ret_cl/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/ret_fn_ret_cl/target/witness.tr rename to crates/nargo_cli/tests/execution_success/ret_fn_ret_cl/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/scalar_mul/Nargo.toml b/crates/nargo_cli/tests/execution_success/scalar_mul/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/scalar_mul/Nargo.toml rename to crates/nargo_cli/tests/execution_success/scalar_mul/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/scalar_mul/Prover.toml b/crates/nargo_cli/tests/execution_success/scalar_mul/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/scalar_mul/Prover.toml rename to crates/nargo_cli/tests/execution_success/scalar_mul/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/scalar_mul/src/main.nr b/crates/nargo_cli/tests/execution_success/scalar_mul/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/scalar_mul/src/main.nr rename to crates/nargo_cli/tests/execution_success/scalar_mul/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/scalar_mul/target/scalar_mul.json b/crates/nargo_cli/tests/execution_success/scalar_mul/target/scalar_mul.json similarity index 100% rename from crates/nargo_cli/tests/test_data/scalar_mul/target/scalar_mul.json rename to crates/nargo_cli/tests/execution_success/scalar_mul/target/scalar_mul.json diff --git a/crates/nargo_cli/tests/test_data/scalar_mul/target/witness.tr b/crates/nargo_cli/tests/execution_success/scalar_mul/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/scalar_mul/target/witness.tr rename to crates/nargo_cli/tests/execution_success/scalar_mul/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/schnorr/Nargo.toml b/crates/nargo_cli/tests/execution_success/schnorr/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/schnorr/Nargo.toml rename to crates/nargo_cli/tests/execution_success/schnorr/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/schnorr/Prover.toml b/crates/nargo_cli/tests/execution_success/schnorr/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/schnorr/Prover.toml rename to crates/nargo_cli/tests/execution_success/schnorr/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/schnorr/src/main.nr b/crates/nargo_cli/tests/execution_success/schnorr/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/schnorr/src/main.nr rename to crates/nargo_cli/tests/execution_success/schnorr/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/schnorr/target/schnorr.json b/crates/nargo_cli/tests/execution_success/schnorr/target/schnorr.json similarity index 100% rename from crates/nargo_cli/tests/test_data/schnorr/target/schnorr.json rename to crates/nargo_cli/tests/execution_success/schnorr/target/schnorr.json diff --git a/crates/nargo_cli/tests/test_data/schnorr/target/witness.tr b/crates/nargo_cli/tests/execution_success/schnorr/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/schnorr/target/witness.tr rename to crates/nargo_cli/tests/execution_success/schnorr/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/sha256/Nargo.toml b/crates/nargo_cli/tests/execution_success/sha256/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/sha256/Nargo.toml rename to crates/nargo_cli/tests/execution_success/sha256/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/sha256/Prover.toml b/crates/nargo_cli/tests/execution_success/sha256/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/sha256/Prover.toml rename to crates/nargo_cli/tests/execution_success/sha256/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/sha256/src/main.nr b/crates/nargo_cli/tests/execution_success/sha256/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/sha256/src/main.nr rename to crates/nargo_cli/tests/execution_success/sha256/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/sha256/target/sha256.json b/crates/nargo_cli/tests/execution_success/sha256/target/sha256.json similarity index 100% rename from crates/nargo_cli/tests/test_data/sha256/target/sha256.json rename to crates/nargo_cli/tests/execution_success/sha256/target/sha256.json diff --git a/crates/nargo_cli/tests/test_data/sha256/target/witness.tr b/crates/nargo_cli/tests/execution_success/sha256/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/sha256/target/witness.tr rename to crates/nargo_cli/tests/execution_success/sha256/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/sha2_blocks/Nargo.toml b/crates/nargo_cli/tests/execution_success/sha2_blocks/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/sha2_blocks/Nargo.toml rename to crates/nargo_cli/tests/execution_success/sha2_blocks/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/sha2_blocks/Prover.toml b/crates/nargo_cli/tests/execution_success/sha2_blocks/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/sha2_blocks/Prover.toml rename to crates/nargo_cli/tests/execution_success/sha2_blocks/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/sha2_blocks/src/main.nr b/crates/nargo_cli/tests/execution_success/sha2_blocks/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/sha2_blocks/src/main.nr rename to crates/nargo_cli/tests/execution_success/sha2_blocks/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/sha2_blocks/target/sha2_blocks.json b/crates/nargo_cli/tests/execution_success/sha2_blocks/target/sha2_blocks.json similarity index 100% rename from crates/nargo_cli/tests/test_data/sha2_blocks/target/sha2_blocks.json rename to crates/nargo_cli/tests/execution_success/sha2_blocks/target/sha2_blocks.json diff --git a/crates/nargo_cli/tests/test_data/sha2_blocks/target/witness.tr b/crates/nargo_cli/tests/execution_success/sha2_blocks/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/sha2_blocks/target/witness.tr rename to crates/nargo_cli/tests/execution_success/sha2_blocks/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/sha2_byte/Nargo.toml b/crates/nargo_cli/tests/execution_success/sha2_byte/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/sha2_byte/Nargo.toml rename to crates/nargo_cli/tests/execution_success/sha2_byte/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/sha2_byte/Prover.toml b/crates/nargo_cli/tests/execution_success/sha2_byte/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/sha2_byte/Prover.toml rename to crates/nargo_cli/tests/execution_success/sha2_byte/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/sha2_byte/src/main.nr b/crates/nargo_cli/tests/execution_success/sha2_byte/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/sha2_byte/src/main.nr rename to crates/nargo_cli/tests/execution_success/sha2_byte/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/sha2_byte/target/sha2_byte.json b/crates/nargo_cli/tests/execution_success/sha2_byte/target/sha2_byte.json similarity index 100% rename from crates/nargo_cli/tests/test_data/sha2_byte/target/sha2_byte.json rename to crates/nargo_cli/tests/execution_success/sha2_byte/target/sha2_byte.json diff --git a/crates/nargo_cli/tests/test_data/sha2_byte/target/witness.tr b/crates/nargo_cli/tests/execution_success/sha2_byte/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/sha2_byte/target/witness.tr rename to crates/nargo_cli/tests/execution_success/sha2_byte/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/signed_division/Nargo.toml b/crates/nargo_cli/tests/execution_success/signed_division/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/signed_division/Nargo.toml rename to crates/nargo_cli/tests/execution_success/signed_division/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/signed_division/Prover.toml b/crates/nargo_cli/tests/execution_success/signed_division/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/signed_division/Prover.toml rename to crates/nargo_cli/tests/execution_success/signed_division/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/signed_division/src/main.nr b/crates/nargo_cli/tests/execution_success/signed_division/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/signed_division/src/main.nr rename to crates/nargo_cli/tests/execution_success/signed_division/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/signed_division/target/signed_division.json b/crates/nargo_cli/tests/execution_success/signed_division/target/signed_division.json similarity index 100% rename from crates/nargo_cli/tests/test_data/signed_division/target/signed_division.json rename to crates/nargo_cli/tests/execution_success/signed_division/target/signed_division.json diff --git a/crates/nargo_cli/tests/test_data/signed_division/target/witness.tr b/crates/nargo_cli/tests/execution_success/signed_division/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/signed_division/target/witness.tr rename to crates/nargo_cli/tests/execution_success/signed_division/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/simple_add_and_ret_arr/Nargo.toml b/crates/nargo_cli/tests/execution_success/simple_add_and_ret_arr/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_add_and_ret_arr/Nargo.toml rename to crates/nargo_cli/tests/execution_success/simple_add_and_ret_arr/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/simple_add_and_ret_arr/Prover.toml b/crates/nargo_cli/tests/execution_success/simple_add_and_ret_arr/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_add_and_ret_arr/Prover.toml rename to crates/nargo_cli/tests/execution_success/simple_add_and_ret_arr/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/simple_add_and_ret_arr/src/main.nr b/crates/nargo_cli/tests/execution_success/simple_add_and_ret_arr/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_add_and_ret_arr/src/main.nr rename to crates/nargo_cli/tests/execution_success/simple_add_and_ret_arr/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/simple_add_and_ret_arr/target/simple_add_and_ret_arr.json b/crates/nargo_cli/tests/execution_success/simple_add_and_ret_arr/target/simple_add_and_ret_arr.json similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_add_and_ret_arr/target/simple_add_and_ret_arr.json rename to crates/nargo_cli/tests/execution_success/simple_add_and_ret_arr/target/simple_add_and_ret_arr.json diff --git a/crates/nargo_cli/tests/test_data/simple_add_and_ret_arr/target/witness.tr b/crates/nargo_cli/tests/execution_success/simple_add_and_ret_arr/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_add_and_ret_arr/target/witness.tr rename to crates/nargo_cli/tests/execution_success/simple_add_and_ret_arr/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/simple_array_param/Nargo.toml b/crates/nargo_cli/tests/execution_success/simple_array_param/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_array_param/Nargo.toml rename to crates/nargo_cli/tests/execution_success/simple_array_param/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/simple_array_param/Prover.toml b/crates/nargo_cli/tests/execution_success/simple_array_param/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_array_param/Prover.toml rename to crates/nargo_cli/tests/execution_success/simple_array_param/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/simple_array_param/src/main.nr b/crates/nargo_cli/tests/execution_success/simple_array_param/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_array_param/src/main.nr rename to crates/nargo_cli/tests/execution_success/simple_array_param/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/simple_array_param/target/simple_array_param.json b/crates/nargo_cli/tests/execution_success/simple_array_param/target/simple_array_param.json similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_array_param/target/simple_array_param.json rename to crates/nargo_cli/tests/execution_success/simple_array_param/target/simple_array_param.json diff --git a/crates/nargo_cli/tests/test_data/simple_array_param/target/witness.tr b/crates/nargo_cli/tests/execution_success/simple_array_param/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_array_param/target/witness.tr rename to crates/nargo_cli/tests/execution_success/simple_array_param/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/simple_bitwise/Nargo.toml b/crates/nargo_cli/tests/execution_success/simple_bitwise/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_bitwise/Nargo.toml rename to crates/nargo_cli/tests/execution_success/simple_bitwise/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/simple_bitwise/Prover.toml b/crates/nargo_cli/tests/execution_success/simple_bitwise/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_bitwise/Prover.toml rename to crates/nargo_cli/tests/execution_success/simple_bitwise/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/simple_bitwise/src/main.nr b/crates/nargo_cli/tests/execution_success/simple_bitwise/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_bitwise/src/main.nr rename to crates/nargo_cli/tests/execution_success/simple_bitwise/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/simple_bitwise/target/simple_bitwise.json b/crates/nargo_cli/tests/execution_success/simple_bitwise/target/simple_bitwise.json similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_bitwise/target/simple_bitwise.json rename to crates/nargo_cli/tests/execution_success/simple_bitwise/target/simple_bitwise.json diff --git a/crates/nargo_cli/tests/test_data/simple_bitwise/target/witness.tr b/crates/nargo_cli/tests/execution_success/simple_bitwise/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_bitwise/target/witness.tr rename to crates/nargo_cli/tests/execution_success/simple_bitwise/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/simple_comparison/Nargo.toml b/crates/nargo_cli/tests/execution_success/simple_comparison/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_comparison/Nargo.toml rename to crates/nargo_cli/tests/execution_success/simple_comparison/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/simple_comparison/Prover.toml b/crates/nargo_cli/tests/execution_success/simple_comparison/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_comparison/Prover.toml rename to crates/nargo_cli/tests/execution_success/simple_comparison/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/simple_comparison/src/main.nr b/crates/nargo_cli/tests/execution_success/simple_comparison/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_comparison/src/main.nr rename to crates/nargo_cli/tests/execution_success/simple_comparison/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/simple_comparison/target/simple_comparison.json b/crates/nargo_cli/tests/execution_success/simple_comparison/target/simple_comparison.json similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_comparison/target/simple_comparison.json rename to crates/nargo_cli/tests/execution_success/simple_comparison/target/simple_comparison.json diff --git a/crates/nargo_cli/tests/test_data/simple_comparison/target/witness.tr b/crates/nargo_cli/tests/execution_success/simple_comparison/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_comparison/target/witness.tr rename to crates/nargo_cli/tests/execution_success/simple_comparison/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/simple_mut/Nargo.toml b/crates/nargo_cli/tests/execution_success/simple_mut/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_mut/Nargo.toml rename to crates/nargo_cli/tests/execution_success/simple_mut/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/simple_mut/Prover.toml b/crates/nargo_cli/tests/execution_success/simple_mut/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_mut/Prover.toml rename to crates/nargo_cli/tests/execution_success/simple_mut/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/simple_mut/src/main.nr b/crates/nargo_cli/tests/execution_success/simple_mut/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_mut/src/main.nr rename to crates/nargo_cli/tests/execution_success/simple_mut/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/simple_mut/target/simple_mut.json b/crates/nargo_cli/tests/execution_success/simple_mut/target/simple_mut.json similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_mut/target/simple_mut.json rename to crates/nargo_cli/tests/execution_success/simple_mut/target/simple_mut.json diff --git a/crates/nargo_cli/tests/test_data/simple_mut/target/witness.tr b/crates/nargo_cli/tests/execution_success/simple_mut/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_mut/target/witness.tr rename to crates/nargo_cli/tests/execution_success/simple_mut/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/simple_not/Nargo.toml b/crates/nargo_cli/tests/execution_success/simple_not/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_not/Nargo.toml rename to crates/nargo_cli/tests/execution_success/simple_not/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/simple_not/Prover.toml b/crates/nargo_cli/tests/execution_success/simple_not/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_not/Prover.toml rename to crates/nargo_cli/tests/execution_success/simple_not/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/simple_not/src/main.nr b/crates/nargo_cli/tests/execution_success/simple_not/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_not/src/main.nr rename to crates/nargo_cli/tests/execution_success/simple_not/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/simple_not/target/simple_not.json b/crates/nargo_cli/tests/execution_success/simple_not/target/simple_not.json similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_not/target/simple_not.json rename to crates/nargo_cli/tests/execution_success/simple_not/target/simple_not.json diff --git a/crates/nargo_cli/tests/test_data/simple_not/target/witness.tr b/crates/nargo_cli/tests/execution_success/simple_not/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_not/target/witness.tr rename to crates/nargo_cli/tests/execution_success/simple_not/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/simple_print/Nargo.toml b/crates/nargo_cli/tests/execution_success/simple_print/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_print/Nargo.toml rename to crates/nargo_cli/tests/execution_success/simple_print/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/simple_print/Prover.toml b/crates/nargo_cli/tests/execution_success/simple_print/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_print/Prover.toml rename to crates/nargo_cli/tests/execution_success/simple_print/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/simple_print/src/main.nr b/crates/nargo_cli/tests/execution_success/simple_print/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_print/src/main.nr rename to crates/nargo_cli/tests/execution_success/simple_print/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/simple_print/target/simple_print.json b/crates/nargo_cli/tests/execution_success/simple_print/target/simple_print.json similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_print/target/simple_print.json rename to crates/nargo_cli/tests/execution_success/simple_print/target/simple_print.json diff --git a/crates/nargo_cli/tests/test_data/simple_print/target/witness.tr b/crates/nargo_cli/tests/execution_success/simple_print/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_print/target/witness.tr rename to crates/nargo_cli/tests/execution_success/simple_print/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/simple_program_addition/Nargo.toml b/crates/nargo_cli/tests/execution_success/simple_program_addition/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_program_addition/Nargo.toml rename to crates/nargo_cli/tests/execution_success/simple_program_addition/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/simple_program_addition/Prover.toml b/crates/nargo_cli/tests/execution_success/simple_program_addition/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_program_addition/Prover.toml rename to crates/nargo_cli/tests/execution_success/simple_program_addition/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/simple_program_addition/src/main.nr b/crates/nargo_cli/tests/execution_success/simple_program_addition/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_program_addition/src/main.nr rename to crates/nargo_cli/tests/execution_success/simple_program_addition/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/simple_program_addition/target/simple_program_addition.json b/crates/nargo_cli/tests/execution_success/simple_program_addition/target/simple_program_addition.json similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_program_addition/target/simple_program_addition.json rename to crates/nargo_cli/tests/execution_success/simple_program_addition/target/simple_program_addition.json diff --git a/crates/nargo_cli/tests/test_data/simple_program_addition/target/witness.tr b/crates/nargo_cli/tests/execution_success/simple_program_addition/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_program_addition/target/witness.tr rename to crates/nargo_cli/tests/execution_success/simple_program_addition/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/simple_program_no_body/Nargo.toml b/crates/nargo_cli/tests/execution_success/simple_program_no_body/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_program_no_body/Nargo.toml rename to crates/nargo_cli/tests/execution_success/simple_program_no_body/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/simple_program_no_body/Prover.toml b/crates/nargo_cli/tests/execution_success/simple_program_no_body/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_program_no_body/Prover.toml rename to crates/nargo_cli/tests/execution_success/simple_program_no_body/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/simple_program_no_body/src/main.nr b/crates/nargo_cli/tests/execution_success/simple_program_no_body/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_program_no_body/src/main.nr rename to crates/nargo_cli/tests/execution_success/simple_program_no_body/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/simple_program_no_body/target/simple_program_no_body.json b/crates/nargo_cli/tests/execution_success/simple_program_no_body/target/simple_program_no_body.json similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_program_no_body/target/simple_program_no_body.json rename to crates/nargo_cli/tests/execution_success/simple_program_no_body/target/simple_program_no_body.json diff --git a/crates/nargo_cli/tests/test_data/simple_program_no_body/target/witness.tr b/crates/nargo_cli/tests/execution_success/simple_program_no_body/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_program_no_body/target/witness.tr rename to crates/nargo_cli/tests/execution_success/simple_program_no_body/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/simple_radix/Nargo.toml b/crates/nargo_cli/tests/execution_success/simple_radix/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_radix/Nargo.toml rename to crates/nargo_cli/tests/execution_success/simple_radix/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/simple_radix/Prover.toml b/crates/nargo_cli/tests/execution_success/simple_radix/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_radix/Prover.toml rename to crates/nargo_cli/tests/execution_success/simple_radix/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/simple_radix/src/main.nr b/crates/nargo_cli/tests/execution_success/simple_radix/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_radix/src/main.nr rename to crates/nargo_cli/tests/execution_success/simple_radix/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/simple_radix/target/simple_radix.json b/crates/nargo_cli/tests/execution_success/simple_radix/target/simple_radix.json similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_radix/target/simple_radix.json rename to crates/nargo_cli/tests/execution_success/simple_radix/target/simple_radix.json diff --git a/crates/nargo_cli/tests/test_data/simple_radix/target/witness.tr b/crates/nargo_cli/tests/execution_success/simple_radix/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_radix/target/witness.tr rename to crates/nargo_cli/tests/execution_success/simple_radix/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/simple_range/Nargo.toml b/crates/nargo_cli/tests/execution_success/simple_range/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_range/Nargo.toml rename to crates/nargo_cli/tests/execution_success/simple_range/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/simple_range/Prover.toml b/crates/nargo_cli/tests/execution_success/simple_range/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_range/Prover.toml rename to crates/nargo_cli/tests/execution_success/simple_range/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/simple_range/src/main.nr b/crates/nargo_cli/tests/execution_success/simple_range/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_range/src/main.nr rename to crates/nargo_cli/tests/execution_success/simple_range/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/simple_range/target/simple_range.json b/crates/nargo_cli/tests/execution_success/simple_range/target/simple_range.json similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_range/target/simple_range.json rename to crates/nargo_cli/tests/execution_success/simple_range/target/simple_range.json diff --git a/crates/nargo_cli/tests/test_data/simple_range/target/witness.tr b/crates/nargo_cli/tests/execution_success/simple_range/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_range/target/witness.tr rename to crates/nargo_cli/tests/execution_success/simple_range/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/simple_shield/Nargo.toml b/crates/nargo_cli/tests/execution_success/simple_shield/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_shield/Nargo.toml rename to crates/nargo_cli/tests/execution_success/simple_shield/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/simple_shield/Prover.toml b/crates/nargo_cli/tests/execution_success/simple_shield/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_shield/Prover.toml rename to crates/nargo_cli/tests/execution_success/simple_shield/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/simple_shield/src/main.nr b/crates/nargo_cli/tests/execution_success/simple_shield/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_shield/src/main.nr rename to crates/nargo_cli/tests/execution_success/simple_shield/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/simple_shield/target/simple_shield.json b/crates/nargo_cli/tests/execution_success/simple_shield/target/simple_shield.json similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_shield/target/simple_shield.json rename to crates/nargo_cli/tests/execution_success/simple_shield/target/simple_shield.json diff --git a/crates/nargo_cli/tests/test_data/simple_shield/target/witness.tr b/crates/nargo_cli/tests/execution_success/simple_shield/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_shield/target/witness.tr rename to crates/nargo_cli/tests/execution_success/simple_shield/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/simple_shift_left_right/Nargo.toml b/crates/nargo_cli/tests/execution_success/simple_shift_left_right/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_shift_left_right/Nargo.toml rename to crates/nargo_cli/tests/execution_success/simple_shift_left_right/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/simple_shift_left_right/Prover.toml b/crates/nargo_cli/tests/execution_success/simple_shift_left_right/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_shift_left_right/Prover.toml rename to crates/nargo_cli/tests/execution_success/simple_shift_left_right/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/simple_shift_left_right/src/main.nr b/crates/nargo_cli/tests/execution_success/simple_shift_left_right/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_shift_left_right/src/main.nr rename to crates/nargo_cli/tests/execution_success/simple_shift_left_right/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/simple_shift_left_right/target/simple_shift_left_right.json b/crates/nargo_cli/tests/execution_success/simple_shift_left_right/target/simple_shift_left_right.json similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_shift_left_right/target/simple_shift_left_right.json rename to crates/nargo_cli/tests/execution_success/simple_shift_left_right/target/simple_shift_left_right.json diff --git a/crates/nargo_cli/tests/test_data/simple_shift_left_right/target/witness.tr b/crates/nargo_cli/tests/execution_success/simple_shift_left_right/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/simple_shift_left_right/target/witness.tr rename to crates/nargo_cli/tests/execution_success/simple_shift_left_right/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/slices/Nargo.toml b/crates/nargo_cli/tests/execution_success/slices/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/slices/Nargo.toml rename to crates/nargo_cli/tests/execution_success/slices/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/slices/Prover.toml b/crates/nargo_cli/tests/execution_success/slices/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/slices/Prover.toml rename to crates/nargo_cli/tests/execution_success/slices/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/slices/src/main.nr b/crates/nargo_cli/tests/execution_success/slices/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/slices/src/main.nr rename to crates/nargo_cli/tests/execution_success/slices/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/slices/target/slices.json b/crates/nargo_cli/tests/execution_success/slices/target/slices.json similarity index 100% rename from crates/nargo_cli/tests/test_data/slices/target/slices.json rename to crates/nargo_cli/tests/execution_success/slices/target/slices.json diff --git a/crates/nargo_cli/tests/test_data/slices/target/witness.tr b/crates/nargo_cli/tests/execution_success/slices/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/slices/target/witness.tr rename to crates/nargo_cli/tests/execution_success/slices/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/strings/Nargo.toml b/crates/nargo_cli/tests/execution_success/strings/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/strings/Nargo.toml rename to crates/nargo_cli/tests/execution_success/strings/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/strings/Prover.toml b/crates/nargo_cli/tests/execution_success/strings/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/strings/Prover.toml rename to crates/nargo_cli/tests/execution_success/strings/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/strings/src/main.nr b/crates/nargo_cli/tests/execution_success/strings/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/strings/src/main.nr rename to crates/nargo_cli/tests/execution_success/strings/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/strings/target/strings.json b/crates/nargo_cli/tests/execution_success/strings/target/strings.json similarity index 100% rename from crates/nargo_cli/tests/test_data/strings/target/strings.json rename to crates/nargo_cli/tests/execution_success/strings/target/strings.json diff --git a/crates/nargo_cli/tests/test_data/strings/target/witness.tr b/crates/nargo_cli/tests/execution_success/strings/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/strings/target/witness.tr rename to crates/nargo_cli/tests/execution_success/strings/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/struct/Nargo.toml b/crates/nargo_cli/tests/execution_success/struct/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/struct/Nargo.toml rename to crates/nargo_cli/tests/execution_success/struct/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/struct/Prover.toml b/crates/nargo_cli/tests/execution_success/struct/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/struct/Prover.toml rename to crates/nargo_cli/tests/execution_success/struct/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/struct/src/main.nr b/crates/nargo_cli/tests/execution_success/struct/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/struct/src/main.nr rename to crates/nargo_cli/tests/execution_success/struct/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/struct/target/struct.json b/crates/nargo_cli/tests/execution_success/struct/target/struct.json similarity index 100% rename from crates/nargo_cli/tests/test_data/struct/target/struct.json rename to crates/nargo_cli/tests/execution_success/struct/target/struct.json diff --git a/crates/nargo_cli/tests/test_data/struct/target/witness.tr b/crates/nargo_cli/tests/execution_success/struct/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/struct/target/witness.tr rename to crates/nargo_cli/tests/execution_success/struct/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/struct_array_inputs/Nargo.toml b/crates/nargo_cli/tests/execution_success/struct_array_inputs/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/struct_array_inputs/Nargo.toml rename to crates/nargo_cli/tests/execution_success/struct_array_inputs/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/struct_array_inputs/Prover.toml b/crates/nargo_cli/tests/execution_success/struct_array_inputs/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/struct_array_inputs/Prover.toml rename to crates/nargo_cli/tests/execution_success/struct_array_inputs/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/struct_array_inputs/src/main.nr b/crates/nargo_cli/tests/execution_success/struct_array_inputs/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/struct_array_inputs/src/main.nr rename to crates/nargo_cli/tests/execution_success/struct_array_inputs/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/struct_array_inputs/target/struct_array_inputs.json b/crates/nargo_cli/tests/execution_success/struct_array_inputs/target/struct_array_inputs.json similarity index 100% rename from crates/nargo_cli/tests/test_data/struct_array_inputs/target/struct_array_inputs.json rename to crates/nargo_cli/tests/execution_success/struct_array_inputs/target/struct_array_inputs.json diff --git a/crates/nargo_cli/tests/test_data/struct_array_inputs/target/witness.tr b/crates/nargo_cli/tests/execution_success/struct_array_inputs/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/struct_array_inputs/target/witness.tr rename to crates/nargo_cli/tests/execution_success/struct_array_inputs/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/struct_fields_ordering/Nargo.toml b/crates/nargo_cli/tests/execution_success/struct_fields_ordering/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/struct_fields_ordering/Nargo.toml rename to crates/nargo_cli/tests/execution_success/struct_fields_ordering/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/struct_fields_ordering/Prover.toml b/crates/nargo_cli/tests/execution_success/struct_fields_ordering/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/struct_fields_ordering/Prover.toml rename to crates/nargo_cli/tests/execution_success/struct_fields_ordering/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/struct_fields_ordering/src/main.nr b/crates/nargo_cli/tests/execution_success/struct_fields_ordering/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/struct_fields_ordering/src/main.nr rename to crates/nargo_cli/tests/execution_success/struct_fields_ordering/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/struct_fields_ordering/target/struct_fields_ordering.json b/crates/nargo_cli/tests/execution_success/struct_fields_ordering/target/struct_fields_ordering.json similarity index 100% rename from crates/nargo_cli/tests/test_data/struct_fields_ordering/target/struct_fields_ordering.json rename to crates/nargo_cli/tests/execution_success/struct_fields_ordering/target/struct_fields_ordering.json diff --git a/crates/nargo_cli/tests/test_data/struct_fields_ordering/target/witness.tr b/crates/nargo_cli/tests/execution_success/struct_fields_ordering/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/struct_fields_ordering/target/witness.tr rename to crates/nargo_cli/tests/execution_success/struct_fields_ordering/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/struct_inputs/Nargo.toml b/crates/nargo_cli/tests/execution_success/struct_inputs/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/struct_inputs/Nargo.toml rename to crates/nargo_cli/tests/execution_success/struct_inputs/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/struct_inputs/Prover.toml b/crates/nargo_cli/tests/execution_success/struct_inputs/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/struct_inputs/Prover.toml rename to crates/nargo_cli/tests/execution_success/struct_inputs/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/struct_inputs/src/foo.nr b/crates/nargo_cli/tests/execution_success/struct_inputs/src/foo.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/struct_inputs/src/foo.nr rename to crates/nargo_cli/tests/execution_success/struct_inputs/src/foo.nr diff --git a/crates/nargo_cli/tests/test_data/struct_inputs/src/foo/bar.nr b/crates/nargo_cli/tests/execution_success/struct_inputs/src/foo/bar.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/struct_inputs/src/foo/bar.nr rename to crates/nargo_cli/tests/execution_success/struct_inputs/src/foo/bar.nr diff --git a/crates/nargo_cli/tests/test_data/struct_inputs/src/main.nr b/crates/nargo_cli/tests/execution_success/struct_inputs/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/struct_inputs/src/main.nr rename to crates/nargo_cli/tests/execution_success/struct_inputs/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/struct_inputs/target/struct_inputs.json b/crates/nargo_cli/tests/execution_success/struct_inputs/target/struct_inputs.json similarity index 100% rename from crates/nargo_cli/tests/test_data/struct_inputs/target/struct_inputs.json rename to crates/nargo_cli/tests/execution_success/struct_inputs/target/struct_inputs.json diff --git a/crates/nargo_cli/tests/test_data/struct_inputs/target/witness.tr b/crates/nargo_cli/tests/execution_success/struct_inputs/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/struct_inputs/target/witness.tr rename to crates/nargo_cli/tests/execution_success/struct_inputs/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/submodules/Nargo.toml b/crates/nargo_cli/tests/execution_success/submodules/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/submodules/Nargo.toml rename to crates/nargo_cli/tests/execution_success/submodules/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/submodules/Prover.toml b/crates/nargo_cli/tests/execution_success/submodules/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/submodules/Prover.toml rename to crates/nargo_cli/tests/execution_success/submodules/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/submodules/src/main.nr b/crates/nargo_cli/tests/execution_success/submodules/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/submodules/src/main.nr rename to crates/nargo_cli/tests/execution_success/submodules/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/submodules/target/submodules.json b/crates/nargo_cli/tests/execution_success/submodules/target/submodules.json similarity index 100% rename from crates/nargo_cli/tests/test_data/submodules/target/submodules.json rename to crates/nargo_cli/tests/execution_success/submodules/target/submodules.json diff --git a/crates/nargo_cli/tests/test_data/submodules/target/witness.tr b/crates/nargo_cli/tests/execution_success/submodules/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/submodules/target/witness.tr rename to crates/nargo_cli/tests/execution_success/submodules/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/to_be_bytes/Nargo.toml b/crates/nargo_cli/tests/execution_success/to_be_bytes/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/to_be_bytes/Nargo.toml rename to crates/nargo_cli/tests/execution_success/to_be_bytes/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/to_be_bytes/Prover.toml b/crates/nargo_cli/tests/execution_success/to_be_bytes/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/to_be_bytes/Prover.toml rename to crates/nargo_cli/tests/execution_success/to_be_bytes/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/to_be_bytes/src/main.nr b/crates/nargo_cli/tests/execution_success/to_be_bytes/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/to_be_bytes/src/main.nr rename to crates/nargo_cli/tests/execution_success/to_be_bytes/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/to_be_bytes/target/to_be_bytes.json b/crates/nargo_cli/tests/execution_success/to_be_bytes/target/to_be_bytes.json similarity index 100% rename from crates/nargo_cli/tests/test_data/to_be_bytes/target/to_be_bytes.json rename to crates/nargo_cli/tests/execution_success/to_be_bytes/target/to_be_bytes.json diff --git a/crates/nargo_cli/tests/test_data/to_be_bytes/target/witness.tr b/crates/nargo_cli/tests/execution_success/to_be_bytes/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/to_be_bytes/target/witness.tr rename to crates/nargo_cli/tests/execution_success/to_be_bytes/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/to_bytes_integration/Nargo.toml b/crates/nargo_cli/tests/execution_success/to_bytes_integration/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/to_bytes_integration/Nargo.toml rename to crates/nargo_cli/tests/execution_success/to_bytes_integration/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/to_bytes_integration/Prover.toml b/crates/nargo_cli/tests/execution_success/to_bytes_integration/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/to_bytes_integration/Prover.toml rename to crates/nargo_cli/tests/execution_success/to_bytes_integration/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/to_bytes_integration/src/main.nr b/crates/nargo_cli/tests/execution_success/to_bytes_integration/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/to_bytes_integration/src/main.nr rename to crates/nargo_cli/tests/execution_success/to_bytes_integration/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/to_bytes_integration/target/to_bytes_integration.json b/crates/nargo_cli/tests/execution_success/to_bytes_integration/target/to_bytes_integration.json similarity index 100% rename from crates/nargo_cli/tests/test_data/to_bytes_integration/target/to_bytes_integration.json rename to crates/nargo_cli/tests/execution_success/to_bytes_integration/target/to_bytes_integration.json diff --git a/crates/nargo_cli/tests/test_data/to_bytes_integration/target/witness.tr b/crates/nargo_cli/tests/execution_success/to_bytes_integration/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/to_bytes_integration/target/witness.tr rename to crates/nargo_cli/tests/execution_success/to_bytes_integration/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/to_le_bytes/Nargo.toml b/crates/nargo_cli/tests/execution_success/to_le_bytes/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/to_le_bytes/Nargo.toml rename to crates/nargo_cli/tests/execution_success/to_le_bytes/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/to_le_bytes/Prover.toml b/crates/nargo_cli/tests/execution_success/to_le_bytes/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/to_le_bytes/Prover.toml rename to crates/nargo_cli/tests/execution_success/to_le_bytes/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/to_le_bytes/src/main.nr b/crates/nargo_cli/tests/execution_success/to_le_bytes/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/to_le_bytes/src/main.nr rename to crates/nargo_cli/tests/execution_success/to_le_bytes/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/to_le_bytes/target/to_le_bytes.json b/crates/nargo_cli/tests/execution_success/to_le_bytes/target/to_le_bytes.json similarity index 100% rename from crates/nargo_cli/tests/test_data/to_le_bytes/target/to_le_bytes.json rename to crates/nargo_cli/tests/execution_success/to_le_bytes/target/to_le_bytes.json diff --git a/crates/nargo_cli/tests/test_data/to_le_bytes/target/witness.tr b/crates/nargo_cli/tests/execution_success/to_le_bytes/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/to_le_bytes/target/witness.tr rename to crates/nargo_cli/tests/execution_success/to_le_bytes/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/tuples/Nargo.toml b/crates/nargo_cli/tests/execution_success/tuples/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/tuples/Nargo.toml rename to crates/nargo_cli/tests/execution_success/tuples/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/workspace/crates/b/Prover.toml b/crates/nargo_cli/tests/execution_success/tuples/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace/crates/b/Prover.toml rename to crates/nargo_cli/tests/execution_success/tuples/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/tuples/src/main.nr b/crates/nargo_cli/tests/execution_success/tuples/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/tuples/src/main.nr rename to crates/nargo_cli/tests/execution_success/tuples/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/tuples/target/tuples.json b/crates/nargo_cli/tests/execution_success/tuples/target/tuples.json similarity index 100% rename from crates/nargo_cli/tests/test_data/tuples/target/tuples.json rename to crates/nargo_cli/tests/execution_success/tuples/target/tuples.json diff --git a/crates/nargo_cli/tests/test_data/tuples/target/witness.tr b/crates/nargo_cli/tests/execution_success/tuples/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/tuples/target/witness.tr rename to crates/nargo_cli/tests/execution_success/tuples/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/type_aliases/Nargo.toml b/crates/nargo_cli/tests/execution_success/type_aliases/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/type_aliases/Nargo.toml rename to crates/nargo_cli/tests/execution_success/type_aliases/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/type_aliases/Prover.toml b/crates/nargo_cli/tests/execution_success/type_aliases/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/type_aliases/Prover.toml rename to crates/nargo_cli/tests/execution_success/type_aliases/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/type_aliases/src/main.nr b/crates/nargo_cli/tests/execution_success/type_aliases/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/type_aliases/src/main.nr rename to crates/nargo_cli/tests/execution_success/type_aliases/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/type_aliases/target/type_aliases.json b/crates/nargo_cli/tests/execution_success/type_aliases/target/type_aliases.json similarity index 100% rename from crates/nargo_cli/tests/test_data/type_aliases/target/type_aliases.json rename to crates/nargo_cli/tests/execution_success/type_aliases/target/type_aliases.json diff --git a/crates/nargo_cli/tests/test_data/type_aliases/target/witness.tr b/crates/nargo_cli/tests/execution_success/type_aliases/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/type_aliases/target/witness.tr rename to crates/nargo_cli/tests/execution_success/type_aliases/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/unconstrained_empty/Nargo.toml b/crates/nargo_cli/tests/execution_success/unconstrained_empty/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/unconstrained_empty/Nargo.toml rename to crates/nargo_cli/tests/execution_success/unconstrained_empty/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/unconstrained_empty/Prover.toml b/crates/nargo_cli/tests/execution_success/unconstrained_empty/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/unconstrained_empty/Prover.toml rename to crates/nargo_cli/tests/execution_success/unconstrained_empty/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/unconstrained_empty/src/main.nr b/crates/nargo_cli/tests/execution_success/unconstrained_empty/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/unconstrained_empty/src/main.nr rename to crates/nargo_cli/tests/execution_success/unconstrained_empty/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/unconstrained_empty/target/unconstrained_empty.json b/crates/nargo_cli/tests/execution_success/unconstrained_empty/target/unconstrained_empty.json similarity index 100% rename from crates/nargo_cli/tests/test_data/unconstrained_empty/target/unconstrained_empty.json rename to crates/nargo_cli/tests/execution_success/unconstrained_empty/target/unconstrained_empty.json diff --git a/crates/nargo_cli/tests/test_data/inner_outer_cl/target/witness.tr b/crates/nargo_cli/tests/execution_success/unconstrained_empty/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/inner_outer_cl/target/witness.tr rename to crates/nargo_cli/tests/execution_success/unconstrained_empty/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/vectors/Nargo.toml b/crates/nargo_cli/tests/execution_success/vectors/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/vectors/Nargo.toml rename to crates/nargo_cli/tests/execution_success/vectors/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/vectors/Prover.toml b/crates/nargo_cli/tests/execution_success/vectors/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/vectors/Prover.toml rename to crates/nargo_cli/tests/execution_success/vectors/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/vectors/src/main.nr b/crates/nargo_cli/tests/execution_success/vectors/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/vectors/src/main.nr rename to crates/nargo_cli/tests/execution_success/vectors/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/vectors/target/vectors.json b/crates/nargo_cli/tests/execution_success/vectors/target/vectors.json similarity index 100% rename from crates/nargo_cli/tests/test_data/vectors/target/vectors.json rename to crates/nargo_cli/tests/execution_success/vectors/target/vectors.json diff --git a/crates/nargo_cli/tests/test_data/vectors/target/witness.tr b/crates/nargo_cli/tests/execution_success/vectors/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/vectors/target/witness.tr rename to crates/nargo_cli/tests/execution_success/vectors/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/workspace_missing_toml/Nargo.toml b/crates/nargo_cli/tests/execution_success/workspace/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_missing_toml/Nargo.toml rename to crates/nargo_cli/tests/execution_success/workspace/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/workspace_fail/crates/b/Prover.toml b/crates/nargo_cli/tests/execution_success/workspace/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_fail/crates/b/Prover.toml rename to crates/nargo_cli/tests/execution_success/workspace/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/workspace_default_member/a/Nargo.toml b/crates/nargo_cli/tests/execution_success/workspace/crates/a/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_default_member/a/Nargo.toml rename to crates/nargo_cli/tests/execution_success/workspace/crates/a/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/workspace_default_member/a/Prover.toml b/crates/nargo_cli/tests/execution_success/workspace/crates/a/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_default_member/a/Prover.toml rename to crates/nargo_cli/tests/execution_success/workspace/crates/a/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/workspace_fail/crates/a/src/main.nr b/crates/nargo_cli/tests/execution_success/workspace/crates/a/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_fail/crates/a/src/main.nr rename to crates/nargo_cli/tests/execution_success/workspace/crates/a/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/workspace_fail/crates/b/Nargo.toml b/crates/nargo_cli/tests/execution_success/workspace/crates/b/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_fail/crates/b/Nargo.toml rename to crates/nargo_cli/tests/execution_success/workspace/crates/b/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/workspace_missing_toml/crates/b/Prover.toml b/crates/nargo_cli/tests/execution_success/workspace/crates/b/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_missing_toml/crates/b/Prover.toml rename to crates/nargo_cli/tests/execution_success/workspace/crates/b/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/workspace_fail/crates/b/src/main.nr b/crates/nargo_cli/tests/execution_success/workspace/crates/b/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_fail/crates/b/src/main.nr rename to crates/nargo_cli/tests/execution_success/workspace/crates/b/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/workspace_default_member/Nargo.toml b/crates/nargo_cli/tests/execution_success/workspace_default_member/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_default_member/Nargo.toml rename to crates/nargo_cli/tests/execution_success/workspace_default_member/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/workspace_default_member/Prover.toml b/crates/nargo_cli/tests/execution_success/workspace_default_member/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_default_member/Prover.toml rename to crates/nargo_cli/tests/execution_success/workspace_default_member/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/workspace_fail/crates/a/Nargo.toml b/crates/nargo_cli/tests/execution_success/workspace_default_member/a/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_fail/crates/a/Nargo.toml rename to crates/nargo_cli/tests/execution_success/workspace_default_member/a/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/workspace_missing_toml/crates/a/Prover.toml b/crates/nargo_cli/tests/execution_success/workspace_default_member/a/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_missing_toml/crates/a/Prover.toml rename to crates/nargo_cli/tests/execution_success/workspace_default_member/a/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/workspace_missing_toml/crates/a/src/main.nr b/crates/nargo_cli/tests/execution_success/workspace_default_member/a/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_missing_toml/crates/a/src/main.nr rename to crates/nargo_cli/tests/execution_success/workspace_default_member/a/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/workspace_missing_toml/crates/b/Nargo.toml b/crates/nargo_cli/tests/execution_success/workspace_default_member/b/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_missing_toml/crates/b/Nargo.toml rename to crates/nargo_cli/tests/execution_success/workspace_default_member/b/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/workspace_default_member/b/Prover.toml b/crates/nargo_cli/tests/execution_success/workspace_default_member/b/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_default_member/b/Prover.toml rename to crates/nargo_cli/tests/execution_success/workspace_default_member/b/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/workspace_missing_toml/crates/b/src/main.nr b/crates/nargo_cli/tests/execution_success/workspace_default_member/b/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_missing_toml/crates/b/src/main.nr rename to crates/nargo_cli/tests/execution_success/workspace_default_member/b/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/workspace_default_member/target/a.json b/crates/nargo_cli/tests/execution_success/workspace_default_member/target/a.json similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_default_member/target/a.json rename to crates/nargo_cli/tests/execution_success/workspace_default_member/target/a.json diff --git a/crates/nargo_cli/tests/test_data/workspace_default_member/target/witness.tr b/crates/nargo_cli/tests/execution_success/workspace_default_member/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/workspace_default_member/target/witness.tr rename to crates/nargo_cli/tests/execution_success/workspace_default_member/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/xor/Nargo.toml b/crates/nargo_cli/tests/execution_success/xor/Nargo.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/xor/Nargo.toml rename to crates/nargo_cli/tests/execution_success/xor/Nargo.toml diff --git a/crates/nargo_cli/tests/test_data/xor/Prover.toml b/crates/nargo_cli/tests/execution_success/xor/Prover.toml similarity index 100% rename from crates/nargo_cli/tests/test_data/xor/Prover.toml rename to crates/nargo_cli/tests/execution_success/xor/Prover.toml diff --git a/crates/nargo_cli/tests/test_data/xor/src/main.nr b/crates/nargo_cli/tests/execution_success/xor/src/main.nr similarity index 100% rename from crates/nargo_cli/tests/test_data/xor/src/main.nr rename to crates/nargo_cli/tests/execution_success/xor/src/main.nr diff --git a/crates/nargo_cli/tests/test_data/xor/target/witness.tr b/crates/nargo_cli/tests/execution_success/xor/target/witness.tr similarity index 100% rename from crates/nargo_cli/tests/test_data/xor/target/witness.tr rename to crates/nargo_cli/tests/execution_success/xor/target/witness.tr diff --git a/crates/nargo_cli/tests/test_data/xor/target/xor.json b/crates/nargo_cli/tests/execution_success/xor/target/xor.json similarity index 100% rename from crates/nargo_cli/tests/test_data/xor/target/xor.json rename to crates/nargo_cli/tests/execution_success/xor/target/xor.json diff --git a/crates/nargo_cli/tests/test_data b/crates/nargo_cli/tests/test_data new file mode 120000 index 00000000000..27727832076 --- /dev/null +++ b/crates/nargo_cli/tests/test_data @@ -0,0 +1 @@ +execution_success/ \ No newline at end of file diff --git a/crates/nargo_cli/tests/test_data/array_dynamic/target/array_dynamic.json b/crates/nargo_cli/tests/test_data/array_dynamic/target/array_dynamic.json deleted file mode 100644 index 687a56bcafd..00000000000 --- a/crates/nargo_cli/tests/test_data/array_dynamic/target/array_dynamic.json +++ /dev/null @@ -1 +0,0 @@ -{"backend":"acvm-backend-barretenberg","abi":{"parameters":[{"name":"x","type":{"kind":"array","length":5,"type":{"kind":"integer","sign":"unsigned","width":32}},"visibility":"private"},{"name":"z","type":{"kind":"integer","sign":"unsigned","width":32},"visibility":"private"},{"name":"t","type":{"kind":"integer","sign":"unsigned","width":32},"visibility":"private"},{"name":"index","type":{"kind":"array","length":5,"type":{"kind":"field"}},"visibility":"private"},{"name":"index2","type":{"kind":"array","length":5,"type":{"kind":"field"}},"visibility":"private"},{"name":"offset","type":{"kind":"field"},"visibility":"private"},{"name":"sublen","type":{"kind":"field"},"visibility":"private"}],"param_witnesses":{"index":[8,9,10,11,12],"index2":[13,14,15,16,17],"offset":[18],"sublen":[19],"t":[7],"x":[1,2,3,4,5],"z":[6]},"return_type":null,"return_witnesses":[]},"bytecode":"H4sIAAAAAAAA/+1daZMURRB9Ozu7sNzIuXKNq4gIaPfM7O4MggIiKCKCyCFesLDjfZ/IKQIShkSgH/Bv+Iv8KzjJVi/VvTMQRL3smAy6Ijq6p5nNepX56mVVTXXzD4B/MVX62kfJnSve51Lmc3/mcznzecB9HnB2BzL2+93fDHj3BjM2Znk2+jwbs9vHUPuY0z7mto957t9K3nfmt48F7WNh+1jUPha7Ovsxs/S58w53jsLK6CyeragD3FDbsaLt6TpKns2l7rzMuzfkzgm3pAx68UjiJBzZiZmx6vOuS+47/ff5Tl8XO0PeveTvF3hYwPNJNAg616IFnk024DjpiBLACu51zGXuMzo4j1R3qhPVorF6fXK8OhnX4lNRtTnRGI3qoxNjjbgRjzZGz1Qbtdpko94Yb040x6NmXK9Nxq3RZrXl2rE03FbN2YqW8doYdROkEjmOg73Vfk0Byl3clrvzCu/ew4jbiPd33cRtBA8Wt052CnHrXqbFbbnnTPksgaxk6iSLm1qHDLX1B6+N0f38Fyroy4ltXkGMK8F/0wKW02g1ZrS/NVUmOsA1J+gr3XnYu1cIOsdmLoK+EmlBl0BWMnWyBd3vRKHithI8cRsGr3OX0bmE2k9KYo8tcMPofYyPK2CUUlLEGcrNVQRbk3ep2az2o4OwKMRpFc9W5ONd7V2XM7GTkuiVgijHyNST9aOqaGsFabWC3TXgkV+r3Wv4MUoJSq/7NCls4Rsm4lwLlvC1Jq0m5bUGMK4DTCTldURuVmjcbJ7OKylXoJOUn/Cui6QcaLPiHMq2O4LeTsrS7hF+jFSTMtun3XCG2n6S6E+riZTpAy2MTyEf3ofyaT2xzVb5tN4Axqdhg08beDirVvm0wQDGZ2CDTxt5OGtW+bTRAMZnYYNPm3g461b5tMkAxs1EjLJBUiaUyUZJGZtJPhUNFN5uRrr08kLaFoKtZCHNbzO7nz3H89/deUqnbQGs+HTzQRRW4i3o/X5mKE6P9K+lzytglFJSxBmqIRFYWpffr6URz1ZqYdZfHS0WZgNtRs6hbLtV9PbCrBit8mOkujDL9mk3nKG2a8Q2W02kNQMY60SMeSUVJmYf76h3XSSVQJt151C23TH0dlKRdo/xY6SaVJg+zWvTusYsBby45b5pfdydG969h9m0fgczY5XdtH4HD9603slOsWm9e5netC4B/A/3Nq1LICuZOtmb1glLcdOb1sfBE5EGuKOSPASJgdlttB/rANecIDXdeat3r3iKhmMzF0FqIv0UjQSykqmTLUh+JwoVpCZ4grQVvM5drAvrYXwB9hIHA3Orw29YJF7lnji2ufN2716RODg2c0kc25BOHBLISqZOduLwO1Fo4tgGXuLYDp3OzV6vfZEXC7M/fDJ9oIXxJQWMGnzaQWyzVT7tMIBxJ2zwaRcPZ9Uqn3YZwPgybPBpNw9nzSqfdhvA+Aps8GkPD2fdKp/2GMC4l4hRNtAmbzCVImMzyaeigcLbve7fy3qxVNusaWGxZztsaMOrRJxWtYHpAy2Mr8EGn/YR22yVT/sMYHwdNvi0n4fT7NxqvwGMb8AGnw7wcJqdWx0wgPFN2ODTQR5Os3OrgwYwHiJilDlVckiRsZnkU9FA4e0hpAubc28R2+LPERU490jPAZlxgiKfDoOrYYprCmqxOmwA49uwwacjZD4p6pNarI4YwHgUOnwqkfnE3Cx3DNzcxo6JtPUo+H3yT3KsNbTtmEK7b0KH4/1knMeJviTGOr5JaKN7sLue1zN4RF+mnsF7x7sunsELtHncOZRt9wR4nVKr3Sf4MVJ9Bo/t0244Q22/S2tz+jEXNs73aDibLU2c79NwVlXj/gEN54Qqzg9pOKOGTIok0SSTI+G+8EpiJv6QuspI7/5Gpj1RYOnmpyisxLMNYDypgFGDc6dgQxMnYEMTT8OGJp6BDU2cBFcT5X9mTTRRuC+8kpiJP6SusvtOtpAwqOnNkAGMLQWMGpz7CDY08WPY0MRPYEMTP4UNTfwMXE2U8VSiicJ94ZXETPwhdZXdd7KFhEFNb+YYwPi5AkYNzn0BG5r4JWxo4lewoYlfw4YmfgOuJsp4KtFE4b7wSmIm/pC6ykg/UY1Me6LA0s1PUViJ5xrA+K0CRg3OfQcbmvg9bGjiD7ChiT/Chib+BK4myngq0UThvvBKYib+kLrK7jvZQsKgpjfzDGD8WQGjFPbLLE4SbbWIfeGWEf8R5wOpPBrqv7+M+I/YT+JbRP/9nZP/QnGeJfqPyJmY6b+8NpoQfZnaaPKLd11sNAm0edY5lG33HHp7o4m0+xw/RqoD2nPgikAer8hbouRbUtxyf0XeeXe+4N0rXvbMsZnLK/IkgP7LniWQlUyd7FGd34lCX5F3HjxBuoD8BakHMCeiUesA15wgXXTnS9694p2dHJu5CNJFpN/ZKYGsZOpkT5MugCdIF4m4LkGnc5fIsXuM2ObLPFx3n9nvNDUk2VdbHrxsAOOvChilsPv2IqU2h+K6Au5gI48lECZmH+9v3nWxBBJo84pzKNvuVfT2Eoi0+yo/RqoPuzIHC9d6nJcSm2vgz4BuI59EFIUV6sDwOhHXbSKuvBIRsf2pRPS7d10kokCb151D2XZvoLcTkbT7Bj9Gqg99Mn26xMMonUfInLzZQzqOPJAhG5BlOUQ2mMgmNtm0MR9TJF/YPmTUvrh9yMxyCWaW/wH2zFEhKKwAAA==","proving_key":null,"verification_key":null} \ No newline at end of file diff --git a/crates/nargo_cli/tests/test_data/array_dynamic/target/witness.tr b/crates/nargo_cli/tests/test_data/array_dynamic/target/witness.tr deleted file mode 100644 index 756e5de17403cefa6c1393de0c6542e7984857ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 581 zcmV-L0=oSliwFP!00002|E<`?j@(cbgyAqVGc(%PW49fgFf()7c00_>42lv37J1%` zG+AVy&r(ZX{i;({7u?_b^gexie%*iHqyKucyq{yG{T-_s09gYas~N;tNjaFYqV^ES ziiSE?Jj}7eaK}nUI9At4==~_@{b=a@80h_2=>0h8*LdjH1lWm*ZqEsmpkI?6tC#|H zO@;lM2G5S^uoE*NYbNx57G%wacau5Luep#l5BfD9>RJHrmIi(n@f!~K2EPFKAFdcP6g0lJ}Io8XL_;T>QLJZrbYJHR%mYdhR0cEI(x6Lw-3?EP-o z`#o^Ry|DNDV88am-XDOv4#M6ag1tWsJ8=Zgcod##$Dpp`(61A4ZJ&g?PC?dbIO7?{ zYO=G8RW#=qD@5lRtBfu<@AHe$`!-~iFvkk!Si>AUFvkY^bqVHp8S1(MbG!<3yasc; z4rjapbG!+2yai{x4RgE$bG!?6-Ge#ahdDlgIX;AbJ%TwthO8%w6|(y2KdeyaA&Kic z%kn%gvbt=?RjX5kIF#)wEt9+mdB}TSI&mj1^CC*iENg|VNus1otNIzd7e0rq7w}v3 zCA_b`f~?o@8|DpUy@fNrgRJ+kUmqarBV>Jotk2N% diff --git a/crates/nargo_cli/tests/test_data/config.toml b/crates/nargo_cli/tests/test_data/config.toml deleted file mode 100644 index bc858bbc7f5..00000000000 --- a/crates/nargo_cli/tests/test_data/config.toml +++ /dev/null @@ -1,5 +0,0 @@ -exclude = [] - - -# List of tests (as their directory name) expecting to fail: if the test pass, we report an error. -fail = ["brillig_assert_fail", "custom_entry_not_found", "dep_impl_primitive", "depend_on_bin", "workspace_fail", "workspace_missing_toml"] diff --git a/crates/nargo_cli/tests/test_data/ec_baby_jubjub/target/ec_baby_jubjub.json b/crates/nargo_cli/tests/test_data/ec_baby_jubjub/target/ec_baby_jubjub.json deleted file mode 100644 index 4c3bb072cb3..00000000000 --- a/crates/nargo_cli/tests/test_data/ec_baby_jubjub/target/ec_baby_jubjub.json +++ /dev/null @@ -1 +0,0 @@ -{"backend":"acvm-backend-barretenberg","abi":{"parameters":[],"param_witnesses":{},"return_type":null,"return_witnesses":[]},"bytecode":"H4sIAAAAAAAA/2NkIAwAQGbG/yQAAAA=","proving_key":null,"verification_key":null} \ No newline at end of file diff --git a/crates/nargo_cli/tests/test_data/higher_order_fn_selector/target/higher_order_fn_selector.json b/crates/nargo_cli/tests/test_data/higher_order_fn_selector/target/higher_order_fn_selector.json deleted file mode 100644 index 4c3bb072cb3..00000000000 --- a/crates/nargo_cli/tests/test_data/higher_order_fn_selector/target/higher_order_fn_selector.json +++ /dev/null @@ -1 +0,0 @@ -{"backend":"acvm-backend-barretenberg","abi":{"parameters":[],"param_witnesses":{},"return_type":null,"return_witnesses":[]},"bytecode":"H4sIAAAAAAAA/2NkIAwAQGbG/yQAAAA=","proving_key":null,"verification_key":null} \ No newline at end of file diff --git a/crates/nargo_cli/tests/test_data/inner_outer_cl/target/inner_outer_cl.json b/crates/nargo_cli/tests/test_data/inner_outer_cl/target/inner_outer_cl.json deleted file mode 100644 index 4c3bb072cb3..00000000000 --- a/crates/nargo_cli/tests/test_data/inner_outer_cl/target/inner_outer_cl.json +++ /dev/null @@ -1 +0,0 @@ -{"backend":"acvm-backend-barretenberg","abi":{"parameters":[],"param_witnesses":{},"return_type":null,"return_witnesses":[]},"bytecode":"H4sIAAAAAAAA/2NkIAwAQGbG/yQAAAA=","proving_key":null,"verification_key":null} \ No newline at end of file diff --git a/crates/nargo_cli/tests/test_data/let_stmt/target/let_stmt.json b/crates/nargo_cli/tests/test_data/let_stmt/target/let_stmt.json deleted file mode 100644 index 4c3bb072cb3..00000000000 --- a/crates/nargo_cli/tests/test_data/let_stmt/target/let_stmt.json +++ /dev/null @@ -1 +0,0 @@ -{"backend":"acvm-backend-barretenberg","abi":{"parameters":[],"param_witnesses":{},"return_type":null,"return_witnesses":[]},"bytecode":"H4sIAAAAAAAA/2NkIAwAQGbG/yQAAAA=","proving_key":null,"verification_key":null} \ No newline at end of file diff --git a/crates/nargo_cli/tests/test_data/let_stmt/target/witness.tr b/crates/nargo_cli/tests/test_data/let_stmt/target/witness.tr deleted file mode 100644 index 4e90289d5e1eafa19edb881b1256718356260d8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23 Zcmb2|=3oE;rvJ$a4GavK_mxsX0suJI1kL~e diff --git a/crates/nargo_cli/tests/test_data/numeric_generics/target/numeric_generics.json b/crates/nargo_cli/tests/test_data/numeric_generics/target/numeric_generics.json deleted file mode 100644 index 4c3bb072cb3..00000000000 --- a/crates/nargo_cli/tests/test_data/numeric_generics/target/numeric_generics.json +++ /dev/null @@ -1 +0,0 @@ -{"backend":"acvm-backend-barretenberg","abi":{"parameters":[],"param_witnesses":{},"return_type":null,"return_witnesses":[]},"bytecode":"H4sIAAAAAAAA/2NkIAwAQGbG/yQAAAA=","proving_key":null,"verification_key":null} \ No newline at end of file diff --git a/crates/nargo_cli/tests/test_data/numeric_generics/target/witness.tr b/crates/nargo_cli/tests/test_data/numeric_generics/target/witness.tr deleted file mode 100644 index 4e90289d5e1eafa19edb881b1256718356260d8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23 Zcmb2|=3oE;rvJ$a4GavK_mxsX0suJI1kL~e diff --git a/crates/nargo_cli/tests/test_data/option/target/option.json b/crates/nargo_cli/tests/test_data/option/target/option.json deleted file mode 100644 index 4c3bb072cb3..00000000000 --- a/crates/nargo_cli/tests/test_data/option/target/option.json +++ /dev/null @@ -1 +0,0 @@ -{"backend":"acvm-backend-barretenberg","abi":{"parameters":[],"param_witnesses":{},"return_type":null,"return_witnesses":[]},"bytecode":"H4sIAAAAAAAA/2NkIAwAQGbG/yQAAAA=","proving_key":null,"verification_key":null} \ No newline at end of file diff --git a/crates/nargo_cli/tests/test_data/option/target/witness.tr b/crates/nargo_cli/tests/test_data/option/target/witness.tr deleted file mode 100644 index 4e90289d5e1eafa19edb881b1256718356260d8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23 Zcmb2|=3oE;rvJ$a4GavK_mxsX0suJI1kL~e diff --git a/crates/nargo_cli/tests/test_data/rebuild.sh b/crates/nargo_cli/tests/test_data/rebuild.sh deleted file mode 100755 index 53d18e5cc93..00000000000 --- a/crates/nargo_cli/tests/test_data/rebuild.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -set -e - -# Parse exclude and fail directories from cargo.toml -exclude_dirs=$(grep "^exclude" config.toml | sed 's/exclude = \[//;s/\]//;s/\"//g;s/ //g' | tr ',' '\n') -fail_dirs=$(grep "^fail" config.toml | sed 's/fail = \[//;s/\]//;s/\"//g;s/ //g' | tr ',' '\n') - -# Convert them to array -exclude_array=($exclude_dirs) -fail_array=($fail_dirs) - -# Merge exclude and fail arrays -exclude_fail_dirs=("${exclude_array[@]}" "${fail_array[@]}" "workspace") - -# Loop over every directory -for dir in ./*; do - if [[ ! -d $dir ]]; then - continue - fi - - dir_name=$(basename "$dir") - if [[ ! " ${exclude_fail_dirs[@]} " =~ " ${dir_name} " ]]; then - cd $dir - if [ -d ./target/ ]; then - rm -r ./target/ - fi - nargo compile && nargo execute witness - cd .. - fi -done - diff --git a/crates/nargo_cli/tests/test_data/regression_2099/target/witness.tr b/crates/nargo_cli/tests/test_data/regression_2099/target/witness.tr deleted file mode 100644 index 4e90289d5e1eafa19edb881b1256718356260d8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23 Zcmb2|=3oE;rvJ$a4GavK_mxsX0suJI1kL~e diff --git a/crates/nargo_cli/tests/test_data/regression_method_cannot_be_found/target/witness.tr b/crates/nargo_cli/tests/test_data/regression_method_cannot_be_found/target/witness.tr deleted file mode 100644 index 4e90289d5e1eafa19edb881b1256718356260d8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23 Zcmb2|=3oE;rvJ$a4GavK_mxsX0suJI1kL~e diff --git a/crates/nargo_cli/tests/test_data/to_bits/target/to_bits.json b/crates/nargo_cli/tests/test_data/to_bits/target/to_bits.json deleted file mode 100644 index 4c3bb072cb3..00000000000 --- a/crates/nargo_cli/tests/test_data/to_bits/target/to_bits.json +++ /dev/null @@ -1 +0,0 @@ -{"backend":"acvm-backend-barretenberg","abi":{"parameters":[],"param_witnesses":{},"return_type":null,"return_witnesses":[]},"bytecode":"H4sIAAAAAAAA/2NkIAwAQGbG/yQAAAA=","proving_key":null,"verification_key":null} \ No newline at end of file diff --git a/crates/nargo_cli/tests/test_data/to_bits/target/witness.tr b/crates/nargo_cli/tests/test_data/to_bits/target/witness.tr deleted file mode 100644 index 4e90289d5e1eafa19edb881b1256718356260d8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23 Zcmb2|=3oE;rvJ$a4GavK_mxsX0suJI1kL~e diff --git a/crates/nargo_cli/tests/test_data/unconstrained_empty/target/witness.tr b/crates/nargo_cli/tests/test_data/unconstrained_empty/target/witness.tr deleted file mode 100644 index 4e90289d5e1eafa19edb881b1256718356260d8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23 Zcmb2|=3oE;rvJ$a4GavK_mxsX0suJI1kL~e diff --git a/crates/nargo_cli/tests/test_data/unit/target/unit.json b/crates/nargo_cli/tests/test_data/unit/target/unit.json deleted file mode 100644 index 4c3bb072cb3..00000000000 --- a/crates/nargo_cli/tests/test_data/unit/target/unit.json +++ /dev/null @@ -1 +0,0 @@ -{"backend":"acvm-backend-barretenberg","abi":{"parameters":[],"param_witnesses":{},"return_type":null,"return_witnesses":[]},"bytecode":"H4sIAAAAAAAA/2NkIAwAQGbG/yQAAAA=","proving_key":null,"verification_key":null} \ No newline at end of file diff --git a/crates/nargo_cli/tests/test_data/unit/target/witness.tr b/crates/nargo_cli/tests/test_data/unit/target/witness.tr deleted file mode 100644 index 4e90289d5e1eafa19edb881b1256718356260d8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23 Zcmb2|=3oE;rvJ$a4GavK_mxsX0suJI1kL~e From b0def14513c60a8ea44fc03e1b08cbf55caceecf Mon Sep 17 00:00:00 2001 From: Ethan-000 Date: Mon, 7 Aug 2023 15:13:41 +0100 Subject: [PATCH 12/18] chore: Improve unary error (#2199) * unary error * . * Update crates/noirc_frontend/src/hir/type_check/errors.rs --------- Co-authored-by: jfecher --- crates/noirc_frontend/src/hir/type_check/errors.rs | 3 +++ crates/noirc_frontend/src/hir/type_check/expr.rs | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/crates/noirc_frontend/src/hir/type_check/errors.rs b/crates/noirc_frontend/src/hir/type_check/errors.rs index 4f032503f3d..8b3623db3c3 100644 --- a/crates/noirc_frontend/src/hir/type_check/errors.rs +++ b/crates/noirc_frontend/src/hir/type_check/errors.rs @@ -71,6 +71,8 @@ pub enum TypeCheckError { IntegerBitWidth { bit_width_x: u32, bit_width_y: u32, span: Span }, #[error("{kind} cannot be used in an infix operation")] InvalidInfixOp { kind: &'static str, span: Span }, + #[error("{kind} cannot be used in a unary operation")] + InvalidUnaryOp { kind: String, span: Span }, #[error("Bitwise operations are invalid on Field types. Try casting the operands to a sized integer type first.")] InvalidBitwiseOperationOnField { span: Span }, #[error("Integer cannot be used with type {typ}")] @@ -174,6 +176,7 @@ impl From for Diagnostic { | TypeCheckError::IntegerSignedness { span, .. } | TypeCheckError::IntegerBitWidth { span, .. } | TypeCheckError::InvalidInfixOp { span, .. } + | TypeCheckError::InvalidUnaryOp { span, .. } | TypeCheckError::InvalidBitwiseOperationOnField { span, .. } | TypeCheckError::IntegerTypeMismatch { span, .. } | TypeCheckError::FieldComparison { span, .. } diff --git a/crates/noirc_frontend/src/hir/type_check/expr.rs b/crates/noirc_frontend/src/hir/type_check/expr.rs index 6c111a1d6a0..5bc6aa45359 100644 --- a/crates/noirc_frontend/src/hir/type_check/expr.rs +++ b/crates/noirc_frontend/src/hir/type_check/expr.rs @@ -1088,7 +1088,13 @@ impl<'interner> TypeChecker<'interner> { }; match op { - crate::UnaryOp::Minus => unify(Type::polymorphic_integer(self.interner)), + crate::UnaryOp::Minus => { + let expected = Type::polymorphic_integer(self.interner); + rhs_type.unify(&expected, span, &mut self.errors, || { + TypeCheckError::InvalidUnaryOp { kind: rhs_type.to_string(), span } + }); + expected + } crate::UnaryOp::Not => { let rhs_type = rhs_type.follow_bindings(); From c46d7a01ca49bb47548df6f3b2aa25d35aa43360 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Mon, 7 Aug 2023 15:59:56 +0100 Subject: [PATCH 13/18] feat: Perform sorting of constant arrays at compile time (#2195) * feat: perform any sorting of constant arrays at compile-time * chore: rebuild artifacts * chore: avoid double check for array elements being constants --- .../compile_success/comptime_sort/Nargo.toml | 7 +++++++ .../compile_success/comptime_sort/src/main.nr | 7 +++++++ crates/nargo_cli/tests/test_data | 2 +- .../src/ssa/ir/instruction/call.rs | 20 ++++++++++++++++++- 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 crates/nargo_cli/tests/compile_success/comptime_sort/Nargo.toml create mode 100644 crates/nargo_cli/tests/compile_success/comptime_sort/src/main.nr diff --git a/crates/nargo_cli/tests/compile_success/comptime_sort/Nargo.toml b/crates/nargo_cli/tests/compile_success/comptime_sort/Nargo.toml new file mode 100644 index 00000000000..15221af78c8 --- /dev/null +++ b/crates/nargo_cli/tests/compile_success/comptime_sort/Nargo.toml @@ -0,0 +1,7 @@ +[package] +name = "comptime_sort" +type = "bin" +authors = [""] +compiler_version = "0.6.0" + +[dependencies] diff --git a/crates/nargo_cli/tests/compile_success/comptime_sort/src/main.nr b/crates/nargo_cli/tests/compile_success/comptime_sort/src/main.nr new file mode 100644 index 00000000000..72b05044331 --- /dev/null +++ b/crates/nargo_cli/tests/compile_success/comptime_sort/src/main.nr @@ -0,0 +1,7 @@ +fn main() { + let unsorted: [u8; 3] = [3,1,2]; + let sorted = unsorted.sort(); + assert(sorted[0] == 1); + assert(sorted[1] == 2); + assert(sorted[2] == 3); +} diff --git a/crates/nargo_cli/tests/test_data b/crates/nargo_cli/tests/test_data index 27727832076..ce80163f960 120000 --- a/crates/nargo_cli/tests/test_data +++ b/crates/nargo_cli/tests/test_data @@ -1 +1 @@ -execution_success/ \ No newline at end of file +execution_success \ No newline at end of file diff --git a/crates/noirc_evaluator/src/ssa/ir/instruction/call.rs b/crates/noirc_evaluator/src/ssa/ir/instruction/call.rs index d5925080870..a28f2d88bcb 100644 --- a/crates/noirc_evaluator/src/ssa/ir/instruction/call.rs +++ b/crates/noirc_evaluator/src/ssa/ir/instruction/call.rs @@ -166,7 +166,8 @@ pub(super) fn simplify_call( } } Intrinsic::BlackBox(bb_func) => simplify_black_box_func(bb_func, arguments, dfg), - Intrinsic::Println | Intrinsic::Sort => SimplifyResult::None, + Intrinsic::Sort => simplify_sort(dfg, arguments), + Intrinsic::Println => SimplifyResult::None, } } @@ -366,3 +367,20 @@ fn simplify_signature( _ => SimplifyResult::None, } } + +fn simplify_sort(dfg: &mut DataFlowGraph, arguments: &[ValueId]) -> SimplifyResult { + match dfg.get_array_constant(arguments[0]) { + Some((input, _)) => { + let inputs: Option> = + input.iter().map(|id| dfg.get_numeric_constant(*id)).collect(); + + let Some(mut sorted_inputs) = inputs else { return SimplifyResult::None }; + sorted_inputs.sort_unstable(); + + let (_, element_type) = dfg.get_numeric_constant_with_type(input[0]).unwrap(); + let result_array = make_constant_array(dfg, sorted_inputs, element_type); + SimplifyResult::SimplifiedTo(result_array) + } + _ => SimplifyResult::None, + } +} From 620517f6527a7b5173dccc16e200ce349f489998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Rodr=C3=ADguez?= Date: Mon, 7 Aug 2023 17:21:00 +0200 Subject: [PATCH 14/18] feat: Add support for slices of structs and nested slices in brillig (#2084) * Start experiment to merge array and slice types * Finish merger of slices and arrays * Implement missing try_bind function * Add missed case for NotConstant * Fix some tests * Fix poseidon test * Fix evaluation of slice length * Fix tests * fix: Initialize Value::Array of type Slice * test: improved brillig test after bug fix * fix: Slice initialization (#2080) * fix: Initialize Value::Array of type Slice * test: improved brillig test after bug fix * feat: nested slices * fix: insert and remove indexes * fix: add missing deallocation * test: added more cases to nested slice test * refactor: simplify array length instructions * test: fix stale import * refactor: reuse element_size and regen json * Update crates/noirc_evaluator/src/brillig/brillig_gen/brillig_block.rs --------- Co-authored-by: Jake Fecher --- .../brillig_nested_slices/Nargo.toml | 7 + .../brillig_nested_slices/Prover.toml | 2 + .../brillig_nested_slices/src/main.nr | 74 +++ .../target/brillig_nested_slices.json | 1 + .../brillig_nested_slices/target/witness.tr | Bin 0 -> 51 bytes .../brillig_slices/src/main.nr | 2 +- .../src/brillig/brillig_gen/brillig_block.rs | 196 +++--- .../brillig/brillig_gen/brillig_slice_ops.rs | 577 +++++++++++------- .../noirc_evaluator/src/brillig/brillig_ir.rs | 18 - 9 files changed, 553 insertions(+), 324 deletions(-) create mode 100644 crates/nargo_cli/tests/execution_success/brillig_nested_slices/Nargo.toml create mode 100644 crates/nargo_cli/tests/execution_success/brillig_nested_slices/Prover.toml create mode 100644 crates/nargo_cli/tests/execution_success/brillig_nested_slices/src/main.nr create mode 100644 crates/nargo_cli/tests/execution_success/brillig_nested_slices/target/brillig_nested_slices.json create mode 100644 crates/nargo_cli/tests/execution_success/brillig_nested_slices/target/witness.tr diff --git a/crates/nargo_cli/tests/execution_success/brillig_nested_slices/Nargo.toml b/crates/nargo_cli/tests/execution_success/brillig_nested_slices/Nargo.toml new file mode 100644 index 00000000000..3a558b737d8 --- /dev/null +++ b/crates/nargo_cli/tests/execution_success/brillig_nested_slices/Nargo.toml @@ -0,0 +1,7 @@ +[package] +name = "brillig_nested_slices" +type = "bin" +authors = [""] +compiler_version = "0.6.0" + +[dependencies] diff --git a/crates/nargo_cli/tests/execution_success/brillig_nested_slices/Prover.toml b/crates/nargo_cli/tests/execution_success/brillig_nested_slices/Prover.toml new file mode 100644 index 00000000000..c52564de922 --- /dev/null +++ b/crates/nargo_cli/tests/execution_success/brillig_nested_slices/Prover.toml @@ -0,0 +1,2 @@ +a = "5" +b = "10" diff --git a/crates/nargo_cli/tests/execution_success/brillig_nested_slices/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_nested_slices/src/main.nr new file mode 100644 index 00000000000..f239d94fdc1 --- /dev/null +++ b/crates/nargo_cli/tests/execution_success/brillig_nested_slices/src/main.nr @@ -0,0 +1,74 @@ +use dep::std::slice; +use dep::std; + +// Tests nested slice passing to/from functions +unconstrained fn push_back_to_slice(slice: [T], item: T) -> [T] { + slice.push_back(item) +} + +struct NestedSliceStruct { + id: Field, + arr: [Field] +} + +unconstrained fn create_foo(id: Field, value: Field) -> NestedSliceStruct { + let mut arr = [id]; + arr = arr.push_back(value); + NestedSliceStruct { id, arr } +} + +unconstrained fn main(a: Field, b: Field) { + let mut slice = [create_foo(a, b), create_foo(b, a)]; + assert(slice.len() == 2); + + assert(slice[0].id == a); + assert(slice[0].arr[0] == a); + assert(slice[1].id == b); + assert(slice[1].arr[1] == a); + + slice = push_back_to_slice(slice, create_foo(0, 42)); + assert(slice.len() == 3); + + assert(slice[0].id == a); + assert(slice[0].arr[0] == a); + assert(slice[1].id == b); + assert(slice[1].arr[1] == a); + + assert(slice[2].id == 0); + assert(slice[2].arr[0] == 0); + assert(slice[2].arr[1] == 42); + + slice = slice.push_front(create_foo(1, 43)); + slice = slice.push_back(create_foo(2, 44)); + + assert(slice.len() == 5); + + let pop_front_result = slice.pop_front(); + slice = pop_front_result.1; + assert(pop_front_result.0.id == 1); + + let pop_back_result = slice.pop_back(); + slice = pop_back_result.0; + assert(pop_back_result.1.id == 2); + + assert(slice.len() == 3); + + let mut remove_result = slice.remove(0); + slice = remove_result.0; + let mut removed_item = remove_result.1; + assert(removed_item.arr[0] == a); + + remove_result = slice.remove(1); + slice = remove_result.0; + removed_item = remove_result.1; + assert(removed_item.arr[0] == 0); + + let last_item = slice[0]; + + assert(last_item.id == b); + slice = slice.insert(1, removed_item); + + assert(slice.len() == 2); + assert(slice[0].id == b); + assert(slice[1].id == 0); +} diff --git a/crates/nargo_cli/tests/execution_success/brillig_nested_slices/target/brillig_nested_slices.json b/crates/nargo_cli/tests/execution_success/brillig_nested_slices/target/brillig_nested_slices.json new file mode 100644 index 00000000000..c39fa017efa --- /dev/null +++ b/crates/nargo_cli/tests/execution_success/brillig_nested_slices/target/brillig_nested_slices.json @@ -0,0 +1 @@ +{"backend":"acvm-backend-barretenberg","abi":{"parameters":[{"name":"a","type":{"kind":"field"},"visibility":"private"},{"name":"b","type":{"kind":"field"},"visibility":"private"}],"param_witnesses":{"a":[1],"b":[2]},"return_type":null,"return_witnesses":[]},"bytecode":"H4sIAAAAAAAA/83dd5Rc1X0H8Lczs7t6M7O7qitppVXvqzIzq954dJBAIJoECFBBElU00UvoxjE2piWhxAZs0+1gCJAQbAO2wbTgGMfYBky3cWyDyzk5+TO+j/fVfvdyNULWvWe/7xydueW9+/vc8srO7ozyURQ1RJ9s+b/+y0Wf3lCfZK+VXduqDf7aqoR05gI5zfbD8ievcTbu7I8d89BE6cSTqcn/mFUaydr6138lcueoLwXPc9UQ9d4SSiMWW/JCloY+tsRkiKgM9Tkqa8zSeSrLOdpDfSO9bqI13+xou5+j7djRNtpsdlj7UVkTpe32eMxxTJK9VnZtS8ec4ySUR6xi1Pt872tLXsiSsyzbu4aE8PGWULqfw5IXshSELI1CliYhS+hza2csoa9/O7Js757juge47hU5R3s4Bvvb95ySo52yI15Lli44DCWHtUxlxSzd4miPxxzHJNlrZde2dMw5TkJ5xOJ7TouAJRayNAlZGoUsBSFLXsiSc1hKfi01vj5FZOItoXSJLG1+LbONpXUnLG1k6e/Xkv4sPYBiwdWfxgH1/CwywK8jXSv9rf4jP4DiDvQbN10X3H+z1ZsLxDfHDXL4BgcYl0GWBXnE4jnin4kHkQsbt+Waa1ef+mKu7XS9ddncx9YmGjdPcXd6XSK+OW6wwzckwLgMtizIIxbPET83Y78iHc9tueba1ae+mOuYysp9bCmRoZXKsB/uG0WHmdcJ96Mv1kmR+jQ4nKXGlkLW7gDLYuK2e47L7RfIgDh5qr8xe23JxmVo1HuOzLwNt8qMucOvOZ03xEG7yCOW8Q3L0sPDWdJnlBFkGepwIP4IcnR6HhPTxmiHo5Mco7L0aCqDCXUx1Y8i7xjP3gbLm1B+DPlGWmZ2mfWKscVzep7q785esV7RBq/XsVaZ6eu4AH1FHLSL/Djq65gsPZYsIdbrOLJgTHi92rZQ63Wiw8HrdUKWnkhlMKEupvoJ5J3k2dtgeRPKTyLfeMscag7ZgjHpqDN2nC5QPZ83qH8ye8V5g/7xeTPFKjP9nOq3n+mYIw7aRX4q9XVylp5ClhD3yalkwZi0k8O2GUeXX0e3aWOGw9FFjulZegaVwYS6mOqnk3emX286h+xNKD+TfNMsM7vMesXY5ukV9a9kr1ivaIPX6yyrzPS1EqCviIN2ka9QX9HvWWQJsV75jxEwJrxebVuo9drtcPB6rWXpbiqDCXUx1dfIO9uvN51D9iaUn02+qmUOdY9kC8aks87YcbpA9XydR/0H2SvOG/SPz5u5Vpnp5zzP/WygOGgX+XnU1zlZei5ZfN9bm6h9P23W1m3v99ohxjGyxjGyxnF7v9fua0tByNIoZGkSsjQLWfoJWWIhS1HIUhKyhL5/7YylRcjSKmRpE7L0F7IMELIMFLIMErIMFrIMEbK0C1mGClmGCVmGC1k6hCwjhCwjhSydQpZRQpbRQpYxQpaxQpZxQpbxQpYJQpaJQpZJQpbJQpYpQpapQpZpQpYuIct0IcsMIctMIcssIUtFyFIVstSELN1CltlCljlClrlCloY+tmzvs4io76Cy+Vl6LpXlHO3hd6jY3/4s4sKsPEfHLMrS/FnExVm64DAsdFgXUdmCLL3Y0R6POY5JstfKrm3pmHOchPKIxZ9FXCxgmStkmSNkmS1k6Ray1IQsVSFLRcgyS8gyU8gyQ8gyXcjSJWSZJmSZKmSZImSZLGSZJGSZKGSZIGQZL2QZJ2QZK2QZI2QZLWQZJWTpFLKMFLKMELJ0CFmGC1mGCVmGClnahSxDhCyDhSyDhCwDhSwDhCz9hSxtQpZWIUuLkKUsZCkJWYpClljI0k/I0ixkaRKyNApZCkKWvJAlZ1m291ngED7eEkovcljyQpaCkKVRyNIkZGkWsvQTssRClqKQpSRkKQtZWoQsrUKWNiFLfyHLACHLQCHLICHLYCHLECFLu5BlqJBlmJBluJClQ8gyQsgyUsjSKWQZJWQZLWQZI2QZK2QZJ2QZL2SZIGSZKGSZJGSZLGSZImSZKmSZJmTpErJMF7LMELLMFLLMErJUhCxVIUtNyNItZJktZJkjZJkrZJknZJkvZFkgZAn9+/OdsTT0sWV7nx1H/Wwqw+e151DZkiw9n8qWZmn+PPluWXoBleUcFvy+nj8bjt+bL6Ey/P56KZXh98iIZfa5o/xpa87Rp7zDusTRp4WOY3kOcUySvVZ2bUvnkOMklEcs/iz6QgHLYiHLAiHLfCHLPCHLXCHLHCHLbCFLt5ClJmSpClkqQpZZQpaZQpYZQpbpQpYuIcs0IctUIcsUIctkIcskIctEIcsEIct4Ics4IctYIcsYIctoIcsoIUunkGWkkGWEkKVDyDJcyDJMyDJUyNIuZBkiZBksZBkkZBkoZBkgZOkvZGkTsrQKWVqELGUhS0nIUhSyxEKWfkKWZiFLk5ClUchSELLkhSw5y8J/GxD6M7SIg3aR578NgWE3KsN+S6kftjkmK/dj9wD9QFtoF/ndyWePXwBLjS2FLL3Ispi4XX7jdnP7BWoXcfJU/0S2+FuycdkjK+d528sqM+a9/ZrTeUMctIs8Yhnfnll6L7J0+LVUOGZEY9JBDttmHJ2ex8S0sZ/D0UmOfbP0flQGE+piqt+XvPt79jZY3oTy+5NvH8vMLrNeMba4Fuap/mVrvaINXq/LrDLT1+UB+ros6t1X5JdTX9HvZWQJsV6XkwVjwuvVtoVaryscDl6vB2bpFVQGE+piqj+QvAd59jZY3oTyB5HvAMscag7ZgjHpqDN2nC5QPZ83qH/POm/QPz5vVlplpp+H+O1nOuYro54tofwh1NeDs/RKsrT7tdQ4ZkRj0k4O2xbqfn24w9FFjsOy9OFUBhPqYqo/jLxH+PWmc8jehPJHkO9Qy8wus14xtnl6Rf3/WusVbfB6XWWVmb6uDtDXVVHvviK/mvqKfq8iS4j1uposGBNer7Yt1Ho92uHg9XpUlj6aymBCXUz1R5F3jV9vOofsTSi/hnxHWuZQ90i2YEw664wdpwtUz9d51JezH6xx3qB/fN4ca5WZfh7nuZ8NFAftIn8c9fWYLH1sOEv6p6prybLG4UD8teRY79eR/vnu8Q7HenJsyNLHU9naLI26mOo3kHejX286h+xNKL+RfOssc6jnI/TVLHHMF+LkqX6MdQ7AxefAJqvMmDcHGD/EQbvIb6bxw1huIkuIc2AzWTAmfA7YtlDnwEkOB58DJ2bpk6gMJtTFVH8ieU/2603nkL0J5U8m3wmWOdQ5wBaMSUedsQvtKFBMPhdRP886FzFmfC6eapUZ8xa/5nQeEQftIr+Fxu+ULH0qWUKci1vIgjHhc9G2hToXz3A4+Fw8PUufQWUwoS6m+tPJe6ZfbzqH7E0ofyb5TrPMoZ7j2IIx6awzdsYx16ujto7bL1BMxMlT/QrrXMSY8bm41Soz5rO9mj+ZR8RBu8ifTeN3VpbeShbf89hE7ftps7Z+e983HWIcI2scI2sct/d9031tKQhZGoUsTUKWZiFLPyFLLGQpCllKQpbQ96+dsbQIWVqFLG1Clv5ClgFCloFClkFClsFCliFClnYhy1AhyzAhy3AhS4eQZYSQZaSQpVPIMkrIMlrIMkbIMlbIMk7IMl7IMkHIMlHIMknIMlnIMkXIMlXIMk3I0iVkmS5kmSFkmSlkmSVkqQhZqkKWmpClW8gyW8gyR8gyV8gyT8gyX8iyQMiyUMiySMiyWMiyRMiyVMiym5AlEbLsLmTZQ8iyp5BlLyHL3kKWfYQs+wpZ9hOy7C9kWSZkWS5kOUDIcqCQZYWQ5SAhy8FClpVClkOELIcKWQ4TshwuZDlCyLJKyLJayHKkkOUoIcvRQpY1QpZjhCzHClmOE7KsFbKsE7KsF7JsELIcL2TZKGTZJGTZLGQ5QchyopDlJCHLyUKWU4QspwpZtghZThOynC5kOUPIcqaQ5Swhy1YhS0MfW7b3/0SjvpPKzsnSW6ks52gPn5XH/uYz4pvo/2s+LyvP0THnZ2n+/5ovyNIFh+E8h/V8Kjs3S1/gaI/HHMck2Wtl17Z0zDlOQnnEKpLhAgHLViHLWUKWM4UsZwhZTheynCZk2SJkOVXIcoqQ5WQhy0lClhOFLCcIWTYLWTYJWTYKWY4XsmwQsqwXsqwTsqwVshwnZDlWyHKMkGWNkOVoIctRQpYjhSyrhSyrhCxHCFkOF7IcJmQ5VMhyiJBlpZDlYCHLQUKWFUKWA4UsBwhZlgtZlglZ9hey7Cdk2VfIso+QZW8hy15Clj2FLHsIWXYXsiRClt2ELEuFLEuELIuFLIuELAuFLAuELPOFLPOELHOFLHOELLOFLN1ClpqQpSpkqQhZZglZZgpZZghZpgtZuoQs04QsU4UsU4Qsk4Usk4QsE4UsE4Qs44Us44QsY4UsY4Qso4Uso4QsnUKWkUKWEUKWDiHLcCHLMCHLUCFLu5BliJBlsJBlkJBloJBlgJClv5ClTcjSKmRpEbKUhSwlIUtRyBILWfoJWZqFLE1ClkYhS0HIkhey5ByWC/1aaiY+vgsA7eIz5IjF3y8QkTuyjsN2HnkvCuC90IoL20UU92K/cSsm7iXUfkIx+Ls5/s5v3CrHbcj+IQbK85Sejgse7Wc2fBYf5iKNF+/H6QutY0pUf1HgPl9MjoTyiGWuGWObewye11klsgz2GitR/TlRMEfVtHmJ3zZrsdU3s9U7nxE/pvG/mPp8qec+8xpHu8hf6hh//l4Y7HcuHc9tuebR7pPpJ9Z+mfrpe25d17ILHb6yZS/RfrjWFh1mnmfuR1+cr3y94bXT7tdS83/tr23g7xvKBR7HyBrHyBpHtuSFLAUhS6OQpUnI0ixk6SdkiYUsRSFLScgS+v61M5YWIUurkKVNyNJfyDJAyDJQyDJIyDJYyDJEyNIuZBkqZBkmZBkuZOkQsowQsowUsnQKWUYJWUYLWcYIWcYKWcYJWcYLWSYIWSYKWSYJWSYLWaYIWaYKWaYJWbqELNOFLDOELDOFLLOELBUhS1XIUhOydAtZZgtZ5ghZ5gpZ5glZ5gtZFghZFgpZFglZFgtZlghZlgpZdhOyJEKW3YUsewhZ9hSy7CVk2VvIso+QZV8hy35Clv2FLMuELMuFLAcIWQ4UsqwQshwkZDlYyLJSyHKIkOVQIcthQpbDhSxHCFlWCVlWC1mOFLIcJWQ5WsiyRshyjJDlWCHLcUKWtUKWdUKW9UKWDUKW44UsG4Usm4Qsm4UsJwhZThSynCRkOVnIcoqQ5VQhyxYhy2lCltOFLGcIWc4UsoT+3o6dsWwVspwtZDlHyHKukOU8Icv5QpYLhCwXCllCf1/PzlguFrJcImRp6GNLHH36e4D4O3/aqezSLM3fmZNztIfvKMH+5rs5NpV76i/PynN0zBVZOk9lV2bpgsNwucN6BZVdlqWvdLTHY45jkuy1smtbOuYcJ6E8YhXJcKWA5RIhy8VClouELBcKWS4QspwvZDlPyHKukOUcIcvZQpatQpazhCxnClnOELKcLmQ5TciyRchyqpDlFCHLyUKWk4QsJwpZThCybBaybBKybBSyHC9k2SBkWS9kWSdkWStkOU7IcqyQ5Rghyxohy9FClqOELEcKWVYLWVYJWY4QshwuZDlMyHKokOUQIctKIcvBQpaDhCwrhCwHClkOELIsF7IsE7LsL2TZT8iyr5BlHyHL3kKWvYQsewpZ9hCy7C5kSYQsuwlZlgpZlghZFgtZFglZFgpZFghZ5gtZ5glZ5gpZ5ghZZgtZuoUsNSFLVchSEbLMErLMFLLMELJMF7J0CVmmCVmmClmmCFkmC1kmCVkmClkmCFnGC1nGCVnGClnGCFlGC1lGCVk6hSwjhSwjhCwdQpbhQpZhQpahQpZ2IcsQIctgIcsgIctAIcsAIUt/IUubkKVVyNIiZCkLWUpClqKQJRay9BOyNAtZmoQsjUKWgpAlL2TJOSxX+bXUTPzLo57NtIvvy0As/l6XiNyRdRy2y8l7tV9vxcT9HLWfUAz+nqRr/MatctyG7B9ioDxP6VW4OdB+ZsP3f8BsdrvKsR+nr7COKVH9VYH7fDU5Esojljl3Dyj2GDyvz3S+r7IMyF9E5Vc7xusqGi/UXxoFs1Y/i9XE/ZzfuLXY6r/Z6p2fiG+Ou8YaP+P7fIBxucayII9YPEf8/VrY7zI63nVuXOU45mrqJ+rL1E/P16a688/nbtmyl2g/XDuLDjPPF/ejL+arGH36WhDAUmNLIep9Dfo8xV3vN+4cbr9ABsTJU/252fWvJRuXv496z5GZt2utMmP+ol9zOm+Ig3aRRyzj+0KWvpYs1/u1pPP25awtPOMg7vU0LtdFvbd6160vk/eGAN7rrbiYxxso7o1+46b3t5uo/YRicH9v9hu3ynHxPIMYKM9T+kv0PHNzT3LbmMFcpPHi/Th9nXVMiepvCNznG8mRUB6xzLl+BT3PeF5nlcgy2GvMhL7WGp8AjvTPwW7agQPxb6KyL1q2mOrZG3K9ol3kbybflyyz8WGNlgOOp+v6cb01pnzvv47KsB+f752efRHFMWscawxx8lR/l3U/u8EaP55zHtO+mnN7nRrLLX4tNb4+4n6GuLc4xiWifSOrD5HVB+O91a83va/cRu0nFIPj3u43bpXj4r6CGCjPU/pxuq/c3pPctuZgNrvd4tiP0zdZx5So/pbAfb6VHAnlEcuccw/SfcXz+kzn+xbLgDzfe9l5gzU2hvcP1n4BrNXPar1tB9Zbrf1M2T9a/pjquU8h1z3aRf528v2TZY6pT3wt9Xw9qDvmfL7AcBOV2XNjfO1+femfyiOOOVewDhEnT/UvW/enW63xM2N6u2NM/znAmN5ujSnyiGV89joIYKmxBT8n32ZZTNwuv3G7uf0CGRAnT/U/t+btK1HvOTLzdodVZsx3+jWn84Y4aBd5xDK+r2bpO8jS4ddSMW3e5bfNdC2gzVzWLvId1Je7A8TF+OEZCWOIWDzHEe3LW0LpO8l7j19ves+8l9pPKMZdVH6f37hVjotnJMRAeZ7Sf6RnpPt6ktvOH5jNbnc79uP0HdYxJaq/O3Cf7yFHQnnEMtePD7K+NpAH+6O/PDee10TNFfdua8xcfbnDstlzbPb5qsPveZxrrrjI30dx7/cbNz2XHqD2E4rB59iDfuNWOS7OJcRAeZ7T9J92PNiT3DbHMBdpvHg/Tt9jHVOi+vsC9/l+ciSURyxzLv0f/bzheZ1V+JqFdpG/i8rZ+RVrbAzva9Z+oa49n8X6wA6s91v7mbKvW/6Y6rlPIdc92kX+QfJ9wzIby71+LenvH3kczVbvnn4vjZXrfuv5uaTuvQexSmS4g8qw353hfLXY8u1o/PhZCuvzHvJ5vrbXPX/ud4zV1wJaSo7YAeLUYqvPZqs3J67zP/Q9YEfnP4/V16kM++HaUKSyu6gf37TKTD++FaAfiIN2kf8W+dCnb1IZ0vz8i2Puo348ZJWZfnw7QD8QB+0i/23y/UuWfsjhK/exj9//eYDKsB/fV1DG6+Vhq8z045EA/UActIv8I+RDnx6mMqR5veAYXi+PWmWmH48F6AfioF3kHyPfv2bpR8NZarFlMVu9a91jNFaPO3z/FmCsHrcsyCNWiQwPB7SUHLEDxKnFVp/NVm9OEN8c9+9Z+nHyPeF5HBooDtpFHrF4rB6hMuyHtV2kskep7AmrH6ZvTzr69p0AfUMctIv8d8j3H1n6SbL4fn+QY0Y0Jh3ksG2cLlB9LnvNU/267OdhvCf73ayc35N9yioz/Xzabz/TMUcctIv809TX72Xpp8ji+3flps1n/LaZvi/zDM1DQvlO6suzAeJi/PB+EMYQsXiOI9qXt4TST5P3Ob/e9H2FH1H7CcV4hsqf9xu3ynHxPhJioDxP6fPpfaTne5Lbzh+YzZp91rEfp5+yjilR/bOB+/wcORLKI5a5fmzJ+tpAHuyP/vLceF4TNVfcZ60xc/XlKctmz7HZ53sOv+dxrrniIv88xX3Bb9z0XHoxawvnEmLwOfZSlk78xK1yXJxLiIHyPKWvpXPppZ7ktjmG2ZxLzzv24/Rz1jElqn8+cJ9fIEdCecQy59JlpR6D53VW4WsW2kX+GSpn53etsTFj/H1rv1DXns9ifXEH1hes/UzZDyx/TPXcp5DrHu0i/xL5fmiZY+oz/+z8owC+Zywf8ojF74M+RWXY72mH+R4BMwzfD2gpOWLzONwnMA4w/IDKsB/WXTH69Hoz/XjOKgvwPFr3meNZ8qFP/ByFNL9/g2P4/ZsXrDLTjxcD9GN713u+FuFa9YLDV+5jH7/f9wyV2c8IfJ3l9fKSVWb68XKAfrxk9QP5l8nnus4izesFx/B6ecUqM/34cYB+IA7aRf7H5PvPLP2Kw/doH/v4PbaXAlpKjtg8Do8LjAMML1MZ9sMcFqNPz12R2uH3tX7i6NurAfqGOGgX+VfJ919Z+idkCfG+1qtkwZjw+1q2LbSjQDERJ0/1b1jvlf00K+f3yn5mlRnza37N6TwiDtpF/jUav//O0j8LPH6vkeWn1vgVHbZQn2/5pcPRSY5fZOlfUhlMqIup/hfkfd2zt8HyJpR/nXw/t8zsMusVY5unV9R/bK1XtMHr9Q2rzPT1zQB9fSPq3Vfk36S+ot9vUBnSfP3EMXz9fMsqM/14O0A/EAftIv82+X6Vpd8iS4j3qN/x22b6PhXazGXtIs/vUb8bIO7bUe9xxVpALJ5jbPXeo36bvO/59abvs7xP7ScU4x0q/8Bv3CrHxftqiIHyPKVbcFLTfmbDdQBms2bfdezH6besY0pU/27gPr9HjoTyiGWug7lyz7i8a+2P/mJuXG2+Ze1j+vI+1XvoS61eX3heOW32ed1h+7VfW7qmf0PtJxSD1/qHfuNWOS7WNGKgPE/pUbSmP+xJbptzmM2a/sCxH6ffs44pUf0Hgfv8a3IklEcss6YHlXsMns+rCl870C7y71A5O9+yxqZE9W9EwazVz2I1cX/jN276Nxjcf7PVu+cgvjnuQ2v8jO+3AcblQ8uCPGLxHL1JZdjvV3Q8t+Waa7tPpp8Yf35+9HzdrPJzCdpF/n3ylS17ifZ7O3stOsymH+85+uH5Oafuvexd8qFP74Wz9LoX4fOC71sWEzfE5zzfpbgw8Oc8Ub80mwz8/IK1yPP2oVXWV+eZ8dnX8FA/b/+WLBgT/nnbtoX6efv3Dgf/vP27LP17KoMJdTHV/468f/DsbbC8CeX/QL7/sczsMusVY8s/b6N+pbVe0Qav14+sMtPXjwP09aOod1+R/5j6in5/RJYQ5/vHZMGYtJPDthlHl19H+jnlPzscXeT4U5b+M5XBhLqY6v9E3r/49aZzyN6E8n8h3x8tc6hrDvpqzgHMF79HivqNdA40Z55Gv570uQzfGYut3nNZI41Ns19LNc7a/ayWZrL082tJ5ymmWHAhTonqc7RP7HlMGigm2kU+pleUFfrYUrIMKMN+mLOiwxxHPd8Dzm2UAvQDcdBukazwxZSGpRzAUrIsiFt2jAu2eudFibwtfr3pz7qt1H5CMWIqbwswTq3U9waKgfI8pb9A72209SS3rTmYzbiWHftxumgdU6L6cuA+t5AjoTximfPkUnpvw/P6TOe7bBl4XUbW2PB4lWm8UJ+nY8vUB/g9r9dqPT/PZ8Gylyw/6myz6Uerox8h1z/aRb6NfOhTq8OXozJ7/Zqy/ta4xHQMt5e34vIzBNrA84rne1DNdQ/iNYXX5qj3Vu96ifaMt+jXW+HrO66XiJGn8pD3FVwv7fWcp/RDdJLw+YL5L9Jr7NiP083WMXwuxYH7vL37Op+336Drpef1mc53bBmQz1N50TFe/Azleg4K8Ty3I2uA56/a3/o8w/cMfibrq3sGDI1Uxs8D2FznRuw4pkh1sWN/1PMzd85qj6/PRWrDHl9vgwVAA2F4+39hIUIAgTECAA==","proving_key":null,"verification_key":null} \ No newline at end of file diff --git a/crates/nargo_cli/tests/execution_success/brillig_nested_slices/target/witness.tr b/crates/nargo_cli/tests/execution_success/brillig_nested_slices/target/witness.tr new file mode 100644 index 0000000000000000000000000000000000000000..3530c6f59c11241b06d274764b06781543549d49 GIT binary patch literal 51 zcmb2|=3oE;rvGbuHgYmBa2(zuzH`U#uK)H67szjEbXazPFaEW)h0v~W{@*>D+!g?p F0s!8X6UYDn literal 0 HcmV?d00001 diff --git a/crates/nargo_cli/tests/execution_success/brillig_slices/src/main.nr b/crates/nargo_cli/tests/execution_success/brillig_slices/src/main.nr index 34a9afcd515..2d871bc4b2f 100644 --- a/crates/nargo_cli/tests/execution_success/brillig_slices/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/brillig_slices/src/main.nr @@ -73,4 +73,4 @@ unconstrained fn main(x: Field, y: Field) { // Tests slice passing to/from functions unconstrained fn push_front_to_slice(slice: [T], item: T) -> [T] { slice.push_front(item) -} \ No newline at end of file +} diff --git a/crates/noirc_evaluator/src/brillig/brillig_gen/brillig_block.rs b/crates/noirc_evaluator/src/brillig/brillig_gen/brillig_block.rs index 5e66519e4ad..6af911e718f 100644 --- a/crates/noirc_evaluator/src/brillig/brillig_gen/brillig_block.rs +++ b/crates/noirc_evaluator/src/brillig/brillig_gen/brillig_block.rs @@ -1,6 +1,3 @@ -use crate::brillig::brillig_gen::brillig_slice_ops::{ - convert_array_or_vector_to_vector, slice_push_back_operation, -}; use crate::brillig::brillig_ir::{ BrilligBinaryOp, BrilligContext, BRILLIG_INTEGER_ARITHMETIC_BIT_SIZE, }; @@ -21,18 +18,14 @@ use iter_extended::vecmap; use super::brillig_black_box::convert_black_box_call; use super::brillig_fn::FunctionContext; -use super::brillig_slice_ops::{ - slice_insert_operation, slice_pop_back_operation, slice_pop_front_operation, - slice_push_front_operation, slice_remove_operation, -}; /// Generate the compilation artifacts for compiling a function into brillig bytecode. pub(crate) struct BrilligBlock<'block> { - function_context: &'block mut FunctionContext, + pub(crate) function_context: &'block mut FunctionContext, /// The basic block that is being converted - block_id: BasicBlockId, + pub(crate) block_id: BasicBlockId, /// Context for creating brillig opcodes - brillig_context: &'block mut BrilligContext, + pub(crate) brillig_context: &'block mut BrilligContext, } impl<'block> BrilligBlock<'block> { @@ -310,8 +303,8 @@ impl<'block> BrilligBlock<'block> { dfg.instruction_results(instruction_id)[0], dfg, ); - let param = self.convert_ssa_value(arguments[0], dfg); - self.brillig_context.length_of_variable_instruction(param, result_register); + let param_id = arguments[0]; + self.convert_ssa_array_len(param_id, result_register, dfg); } Value::Intrinsic( Intrinsic::SlicePushBack @@ -409,7 +402,11 @@ impl<'block> BrilligBlock<'block> { }; let index_register = self.convert_ssa_register_value(*index, dfg); - self.convert_ssa_array_get(array_pointer, index_register, destination_variable); + self.retrieve_variable_from_array( + array_pointer, + index_register, + destination_variable, + ); } Instruction::ArraySet { array, index, value } => { let source_variable = self.convert_ssa_value(*array, dfg); @@ -484,7 +481,7 @@ impl<'block> BrilligBlock<'block> { .post_call_prep_returns_load_registers(&returned_registers, &saved_registers); } - fn convert_ssa_array_get( + pub(crate) fn retrieve_variable_from_array( &mut self, array_pointer: RegisterIndex, index_register: RegisterIndex, @@ -497,7 +494,13 @@ impl<'block> BrilligBlock<'block> { RegisterOrMemory::HeapArray(HeapArray { pointer, .. }) => { self.brillig_context.array_get(array_pointer, index_register, pointer); } - RegisterOrMemory::HeapVector(_) => unimplemented!("ICE: Array get for vector"), + RegisterOrMemory::HeapVector(..) => { + // Vectors are stored as references inside arrays to be able to match SSA indexes + let reference = self.brillig_context.allocate_register(); + self.brillig_context.array_get(array_pointer, index_register, reference); + self.brillig_context.load_variable_instruction(destination_variable, reference); + self.brillig_context.deallocate_register(reference); + } } } @@ -552,7 +555,7 @@ impl<'block> BrilligBlock<'block> { self.brillig_context.deallocate_register(source_size_as_register); } - fn store_variable_in_array( + pub(crate) fn store_variable_in_array( &mut self, destination_pointer: RegisterIndex, index_register: RegisterIndex, @@ -566,7 +569,12 @@ impl<'block> BrilligBlock<'block> { self.brillig_context.array_set(destination_pointer, index_register, pointer); } RegisterOrMemory::HeapVector(_) => { - unimplemented!("ICE: cannot store a vector in array") + // Vectors are stored as references inside arrays to be able to match SSA indexes + let reference = self.brillig_context.allocate_register(); + self.brillig_context.allocate_variable_instruction(reference); + self.brillig_context.store_variable_instruction(reference, value_variable); + self.brillig_context.array_set(destination_pointer, index_register, reference); + self.brillig_context.deallocate_register(reference); } } } @@ -579,9 +587,10 @@ impl<'block> BrilligBlock<'block> { instruction_id: InstructionId, arguments: &[ValueId], ) { - let source_variable = self.convert_ssa_value(arguments[0], dfg); - let source_vector = - convert_array_or_vector_to_vector(self.brillig_context, source_variable); + let slice_id = arguments[0]; + let element_size = dfg.type_of_value(slice_id).element_size(); + let source_variable = self.convert_ssa_value(slice_id, dfg); + let source_vector = self.convert_array_or_vector_to_vector(source_variable); match intrinsic { Value::Intrinsic(Intrinsic::SlicePushBack) => { @@ -591,13 +600,10 @@ impl<'block> BrilligBlock<'block> { dfg, ); let target_vector = self.brillig_context.extract_heap_vector(target_variable); - let item_value = self.convert_ssa_register_value(arguments[1], dfg); - slice_push_back_operation( - self.brillig_context, - target_vector, - source_vector, - item_value, - ); + let item_values = vecmap(&arguments[1..element_size + 1], |arg| { + self.convert_ssa_value(*arg, dfg) + }); + self.slice_push_back_operation(target_vector, source_vector, &item_values); } Value::Intrinsic(Intrinsic::SlicePushFront) => { let target_variable = self.function_context.create_variable( @@ -606,90 +612,101 @@ impl<'block> BrilligBlock<'block> { dfg, ); let target_vector = self.brillig_context.extract_heap_vector(target_variable); - let item_value = self.convert_ssa_register_value(arguments[1], dfg); - slice_push_front_operation( - self.brillig_context, - target_vector, - source_vector, - item_value, - ); + let item_values = vecmap(&arguments[1..element_size + 1], |arg| { + self.convert_ssa_value(*arg, dfg) + }); + self.slice_push_front_operation(target_vector, source_vector, &item_values); } Value::Intrinsic(Intrinsic::SlicePopBack) => { let results = dfg.instruction_results(instruction_id); let target_variable = self.function_context.create_variable(self.brillig_context, results[0], dfg); + let target_vector = self.brillig_context.extract_heap_vector(target_variable); - let pop_item = self.function_context.create_register_variable( - self.brillig_context, - results[1], - dfg, - ); + let pop_variables = vecmap(&results[1..element_size + 1], |result| { + self.function_context.create_variable(self.brillig_context, *result, dfg) + }); - slice_pop_back_operation( - self.brillig_context, - target_vector, - source_vector, - pop_item, - ); + self.slice_pop_back_operation(target_vector, source_vector, &pop_variables); } Value::Intrinsic(Intrinsic::SlicePopFront) => { let results = dfg.instruction_results(instruction_id); - let pop_item = self.function_context.create_register_variable( + let pop_variables = vecmap(&results[0..element_size], |result| { + self.function_context.create_variable(self.brillig_context, *result, dfg) + }); + + let target_variable = self.function_context.create_variable( self.brillig_context, - results[0], + results[element_size], dfg, ); - let target_variable = - self.function_context.create_variable(self.brillig_context, results[1], dfg); let target_vector = self.brillig_context.extract_heap_vector(target_variable); - slice_pop_front_operation( - self.brillig_context, - target_vector, - source_vector, - pop_item, - ); + self.slice_pop_front_operation(target_vector, source_vector, &pop_variables); } Value::Intrinsic(Intrinsic::SliceInsert) => { let results = dfg.instruction_results(instruction_id); - let index = self.convert_ssa_register_value(arguments[1], dfg); - let item = self.convert_ssa_register_value(arguments[2], dfg); + let target_id = results[0]; let target_variable = - self.function_context.create_variable(self.brillig_context, results[0], dfg); + self.function_context.create_variable(self.brillig_context, target_id, dfg); let target_vector = self.brillig_context.extract_heap_vector(target_variable); - slice_insert_operation( - self.brillig_context, - target_vector, - source_vector, - index, - item, + + // Remove if indexing in insert is changed to flattened indexing + // https://github.com/noir-lang/noir/issues/1889#issuecomment-1668048587 + let user_index = self.convert_ssa_register_value(arguments[1], dfg); + + let converted_index = self.brillig_context.make_constant(element_size.into()); + + self.brillig_context.memory_op( + converted_index, + user_index, + converted_index, + BinaryIntOp::Mul, ); + + let items = vecmap(&arguments[2..element_size + 2], |arg| { + self.convert_ssa_value(*arg, dfg) + }); + + self.slice_insert_operation(target_vector, source_vector, converted_index, &items); + self.brillig_context.deallocate_register(converted_index); } Value::Intrinsic(Intrinsic::SliceRemove) => { let results = dfg.instruction_results(instruction_id); - let index = self.convert_ssa_register_value(arguments[1], dfg); + let target_id = results[0]; let target_variable = - self.function_context.create_variable(self.brillig_context, results[0], dfg); + self.function_context.create_variable(self.brillig_context, target_id, dfg); let target_vector = self.brillig_context.extract_heap_vector(target_variable); - let removed_item_register = self.function_context.create_register_variable( - self.brillig_context, - results[1], - dfg, + // Remove if indexing in remove is changed to flattened indexing + // https://github.com/noir-lang/noir/issues/1889#issuecomment-1668048587 + let user_index = self.convert_ssa_register_value(arguments[1], dfg); + + let converted_index = self.brillig_context.make_constant(element_size.into()); + self.brillig_context.memory_op( + converted_index, + user_index, + converted_index, + BinaryIntOp::Mul, ); - slice_remove_operation( - self.brillig_context, + let removed_items = vecmap(&results[1..element_size + 1], |result| { + self.function_context.create_variable(self.brillig_context, *result, dfg) + }); + + self.slice_remove_operation( target_vector, source_vector, - index, - removed_item_register, + converted_index, + &removed_items, ); + + self.brillig_context.deallocate_register(converted_index); } _ => unreachable!("ICE: Slice operation not supported"), } @@ -890,6 +907,37 @@ impl<'block> BrilligBlock<'block> { } } } + + /// Gets the "user-facing" length of an array. + /// An array of structs with two fields would be stored as an 2 * array.len() heap array/heap vector. + /// So we divide the length by the number of subitems in an item to get the user-facing length. + fn convert_ssa_array_len( + &mut self, + array_id: ValueId, + result_register: RegisterIndex, + dfg: &DataFlowGraph, + ) { + let array_variable = self.convert_ssa_value(array_id, dfg); + let element_size = dfg.type_of_value(array_id).element_size(); + + match array_variable { + RegisterOrMemory::HeapArray(HeapArray { size, .. }) => { + self.brillig_context + .const_instruction(result_register, (size / element_size).into()); + } + RegisterOrMemory::HeapVector(HeapVector { size, .. }) => { + self.brillig_context.usize_op( + size, + result_register, + BinaryIntOp::UnsignedDiv, + element_size, + ); + } + _ => { + unreachable!("ICE: Cannot get length of {array_variable:?}") + } + } + } } /// Returns the type of the operation considering the types of the operands diff --git a/crates/noirc_evaluator/src/brillig/brillig_gen/brillig_slice_ops.rs b/crates/noirc_evaluator/src/brillig/brillig_gen/brillig_slice_ops.rs index 99af5c2b13b..facc4766722 100644 --- a/crates/noirc_evaluator/src/brillig/brillig_gen/brillig_slice_ops.rs +++ b/crates/noirc_evaluator/src/brillig/brillig_gen/brillig_slice_ops.rs @@ -1,231 +1,344 @@ use acvm::brillig_vm::brillig::{BinaryIntOp, HeapVector, RegisterIndex, RegisterOrMemory}; -use crate::brillig::brillig_ir::BrilligContext; - -pub(crate) fn slice_push_back_operation( - brillig_context: &mut BrilligContext, - target_vector: HeapVector, - source_vector: HeapVector, - item_to_insert: RegisterIndex, -) { - // First we need to allocate the target vector incrementing the size by 1 - brillig_context.usize_op(source_vector.size, target_vector.size, BinaryIntOp::Add, 1); - brillig_context.allocate_array_instruction(target_vector.pointer, target_vector.size); - - // Now we copy the source vector into the target vector - brillig_context.copy_array_instruction( - source_vector.pointer, - target_vector.pointer, - source_vector.size, - ); - - brillig_context.array_set(target_vector.pointer, source_vector.size, item_to_insert); -} +use super::brillig_block::BrilligBlock; + +impl<'block> BrilligBlock<'block> { + pub(crate) fn slice_push_back_operation( + &mut self, + target_vector: HeapVector, + source_vector: HeapVector, + variables_to_insert: &[RegisterOrMemory], + ) { + // First we need to allocate the target vector incrementing the size by variables_to_insert.len() + self.brillig_context.usize_op( + source_vector.size, + target_vector.size, + BinaryIntOp::Add, + variables_to_insert.len(), + ); + self.brillig_context.allocate_array_instruction(target_vector.pointer, target_vector.size); -pub(crate) fn slice_push_front_operation( - brillig_context: &mut BrilligContext, - target_vector: HeapVector, - source_vector: HeapVector, - item_to_insert: RegisterIndex, -) { - // First we need to allocate the target vector incrementing the size by 1 - brillig_context.usize_op(source_vector.size, target_vector.size, BinaryIntOp::Add, 1); - brillig_context.allocate_array_instruction(target_vector.pointer, target_vector.size); - - // Now we offset the target pointer by one - let destination_copy_pointer = brillig_context.allocate_register(); - brillig_context.usize_op(target_vector.pointer, destination_copy_pointer, BinaryIntOp::Add, 1); - - // Now we copy the source vector into the target vector starting at index 1 - brillig_context.copy_array_instruction( - source_vector.pointer, - destination_copy_pointer, - source_vector.size, - ); - brillig_context.deallocate_register(destination_copy_pointer); - - // Then we write the item to insert at index 0 - let zero = brillig_context.make_constant(0_u128.into()); - brillig_context.array_set(target_vector.pointer, zero, item_to_insert); - brillig_context.deallocate_register(zero); -} + // Now we copy the source vector into the target vector + self.brillig_context.copy_array_instruction( + source_vector.pointer, + target_vector.pointer, + source_vector.size, + ); -pub(crate) fn slice_pop_front_operation( - brillig_context: &mut BrilligContext, - target_vector: HeapVector, - source_vector: HeapVector, - removed_item: RegisterIndex, -) { - // First we need to allocate the target vector decrementing the size by 1 - brillig_context.usize_op(source_vector.size, target_vector.size, BinaryIntOp::Sub, 1); - brillig_context.allocate_array_instruction(target_vector.pointer, target_vector.size); - - // Now we offset the source pointer by one - let source_copy_pointer = brillig_context.allocate_register(); - brillig_context.usize_op(source_vector.pointer, source_copy_pointer, BinaryIntOp::Add, 1); - - // Now we copy the source vector starting at index 1 into the target vector - brillig_context.copy_array_instruction( - source_copy_pointer, - target_vector.pointer, - target_vector.size, - ); - brillig_context.deallocate_register(source_copy_pointer); - - let zero = brillig_context.make_constant(0_u128.into()); - brillig_context.array_get(source_vector.pointer, zero, removed_item); - brillig_context.deallocate_register(zero); -} + for (index, variable) in variables_to_insert.iter().enumerate() { + let target_index = self.brillig_context.make_constant(index.into()); + self.brillig_context.memory_op( + target_index, + source_vector.size, + target_index, + BinaryIntOp::Add, + ); + self.store_variable_in_array(target_vector.pointer, target_index, *variable); + self.brillig_context.deallocate_register(target_index); + } + } -pub(crate) fn slice_pop_back_operation( - brillig_context: &mut BrilligContext, - target_vector: HeapVector, - source_vector: HeapVector, - removed_item: RegisterIndex, -) { - // First we need to allocate the target vector decrementing the size by 1 - brillig_context.usize_op(source_vector.size, target_vector.size, BinaryIntOp::Sub, 1); - brillig_context.allocate_array_instruction(target_vector.pointer, target_vector.size); - - // Now we copy all elements but the last into the target vector - brillig_context.copy_array_instruction( - source_vector.pointer, - target_vector.pointer, - target_vector.size, - ); - - brillig_context.array_get(source_vector.pointer, target_vector.size, removed_item); -} + pub(crate) fn slice_push_front_operation( + &mut self, + target_vector: HeapVector, + source_vector: HeapVector, + variables_to_insert: &[RegisterOrMemory], + ) { + // First we need to allocate the target vector incrementing the size by variables_to_insert.len() + self.brillig_context.usize_op( + source_vector.size, + target_vector.size, + BinaryIntOp::Add, + variables_to_insert.len(), + ); + self.brillig_context.allocate_array_instruction(target_vector.pointer, target_vector.size); + + // Now we offset the target pointer by variables_to_insert.len() + let destination_copy_pointer = self.brillig_context.allocate_register(); + self.brillig_context.usize_op( + target_vector.pointer, + destination_copy_pointer, + BinaryIntOp::Add, + variables_to_insert.len(), + ); -pub(crate) fn slice_insert_operation( - brillig_context: &mut BrilligContext, - target_vector: HeapVector, - source_vector: HeapVector, - index: RegisterIndex, - item: RegisterIndex, -) { - // First we need to allocate the target vector incrementing the size by 1 - brillig_context.usize_op(source_vector.size, target_vector.size, BinaryIntOp::Add, 1); - brillig_context.allocate_array_instruction(target_vector.pointer, target_vector.size); - - // Copy the elements to the left of the index - brillig_context.copy_array_instruction(source_vector.pointer, target_vector.pointer, index); - - // Compute the source pointer just at the index - let source_pointer_at_index = brillig_context.allocate_register(); - brillig_context.memory_op( - source_vector.pointer, - index, - source_pointer_at_index, - BinaryIntOp::Add, - ); - - // Compute the target pointer after the index - let target_pointer_after_index = brillig_context.allocate_register(); - brillig_context.memory_op( - target_vector.pointer, - index, - target_pointer_after_index, - BinaryIntOp::Add, - ); - brillig_context.usize_op_in_place(target_pointer_after_index, BinaryIntOp::Add, 1); - - // Compute the number of elements to the right of the index - let item_count = brillig_context.allocate_register(); - brillig_context.memory_op(source_vector.size, index, item_count, BinaryIntOp::Sub); - - // Copy the elements to the right of the index - brillig_context.copy_array_instruction( - source_pointer_at_index, - target_pointer_after_index, - item_count, - ); - - brillig_context.deallocate_register(source_pointer_at_index); - brillig_context.deallocate_register(target_pointer_after_index); - brillig_context.deallocate_register(item_count); - - // Write the item to insert at the index - brillig_context.array_set(target_vector.pointer, index, item); -} + // Now we copy the source vector into the target vector starting at index variables_to_insert.len() + self.brillig_context.copy_array_instruction( + source_vector.pointer, + destination_copy_pointer, + source_vector.size, + ); -pub(crate) fn slice_remove_operation( - brillig_context: &mut BrilligContext, - target_vector: HeapVector, - source_vector: HeapVector, - index: RegisterIndex, - removed_item: RegisterIndex, -) { - // First we need to allocate the target vector decrementing the size by 1 - brillig_context.usize_op(source_vector.size, target_vector.size, BinaryIntOp::Sub, 1); - brillig_context.allocate_array_instruction(target_vector.pointer, target_vector.size); - - // Copy the elements to the left of the index - brillig_context.copy_array_instruction(source_vector.pointer, target_vector.pointer, index); - - // Compute the source pointer after the index - let source_pointer_after_index = brillig_context.allocate_register(); - brillig_context.memory_op( - source_vector.pointer, - index, - source_pointer_after_index, - BinaryIntOp::Add, - ); - brillig_context.usize_op_in_place(source_pointer_after_index, BinaryIntOp::Add, 1); - - // Compute the target pointer at the index - let target_pointer_at_index = brillig_context.allocate_register(); - brillig_context.memory_op( - target_vector.pointer, - index, - target_pointer_at_index, - BinaryIntOp::Add, - ); - - // Compute the number of elements to the right of the index - let item_count = brillig_context.allocate_register(); - brillig_context.memory_op(source_vector.size, index, item_count, BinaryIntOp::Sub); - brillig_context.usize_op_in_place(item_count, BinaryIntOp::Sub, 1); - - // Copy the elements to the right of the index - brillig_context.copy_array_instruction( - source_pointer_after_index, - target_pointer_at_index, - item_count, - ); - - brillig_context.deallocate_register(source_pointer_after_index); - brillig_context.deallocate_register(target_pointer_at_index); - brillig_context.deallocate_register(item_count); - - // Get the item at the index - brillig_context.array_get(source_vector.pointer, index, removed_item); -} + // Then we write the items to insert at the start + for (index, variable) in variables_to_insert.iter().enumerate() { + let target_index = self.brillig_context.make_constant(index.into()); + self.store_variable_in_array(target_vector.pointer, target_index, *variable); + self.brillig_context.deallocate_register(target_index); + } + + self.brillig_context.deallocate_register(destination_copy_pointer); + } + + pub(crate) fn slice_pop_front_operation( + &mut self, + target_vector: HeapVector, + source_vector: HeapVector, + removed_items: &[RegisterOrMemory], + ) { + // First we need to allocate the target vector decrementing the size by removed_items.len() + self.brillig_context.usize_op( + source_vector.size, + target_vector.size, + BinaryIntOp::Sub, + removed_items.len(), + ); + self.brillig_context.allocate_array_instruction(target_vector.pointer, target_vector.size); + + // Now we offset the source pointer by removed_items.len() + let source_copy_pointer = self.brillig_context.allocate_register(); + self.brillig_context.usize_op( + source_vector.pointer, + source_copy_pointer, + BinaryIntOp::Add, + removed_items.len(), + ); + + // Now we copy the source vector starting at index removed_items.len() into the target vector + self.brillig_context.copy_array_instruction( + source_copy_pointer, + target_vector.pointer, + target_vector.size, + ); + + for (index, variable) in removed_items.iter().enumerate() { + let target_index = self.brillig_context.make_constant(index.into()); + self.retrieve_variable_from_array(source_vector.pointer, target_index, *variable); + self.brillig_context.deallocate_register(target_index); + } -pub(crate) fn convert_array_or_vector_to_vector( - brillig_context: &mut BrilligContext, - source_variable: RegisterOrMemory, -) -> HeapVector { - match source_variable { - RegisterOrMemory::HeapVector(source_vector) => source_vector, - RegisterOrMemory::HeapArray(source_array) => brillig_context.array_to_vector(&source_array), - _ => unreachable!("ICE: unsupported slice push back source {:?}", source_variable), + self.brillig_context.deallocate_register(source_copy_pointer); + } + + pub(crate) fn slice_pop_back_operation( + &mut self, + target_vector: HeapVector, + source_vector: HeapVector, + removed_items: &[RegisterOrMemory], + ) { + // First we need to allocate the target vector decrementing the size by removed_items.len() + self.brillig_context.usize_op( + source_vector.size, + target_vector.size, + BinaryIntOp::Sub, + removed_items.len(), + ); + self.brillig_context.allocate_array_instruction(target_vector.pointer, target_vector.size); + + // Now we copy all elements except the last items into the target vector + self.brillig_context.copy_array_instruction( + source_vector.pointer, + target_vector.pointer, + target_vector.size, + ); + + for (index, variable) in removed_items.iter().enumerate() { + let target_index = self.brillig_context.make_constant(index.into()); + self.brillig_context.memory_op( + target_index, + target_vector.size, + target_index, + BinaryIntOp::Add, + ); + self.retrieve_variable_from_array(source_vector.pointer, target_index, *variable); + self.brillig_context.deallocate_register(target_index); + } + } + + pub(crate) fn slice_insert_operation( + &mut self, + target_vector: HeapVector, + source_vector: HeapVector, + index: RegisterIndex, + items: &[RegisterOrMemory], + ) { + // First we need to allocate the target vector incrementing the size by items.len() + self.brillig_context.usize_op( + source_vector.size, + target_vector.size, + BinaryIntOp::Add, + items.len(), + ); + self.brillig_context.allocate_array_instruction(target_vector.pointer, target_vector.size); + + // Copy the elements to the left of the index + self.brillig_context.copy_array_instruction( + source_vector.pointer, + target_vector.pointer, + index, + ); + + // Compute the source pointer just at the index + let source_pointer_at_index = self.brillig_context.allocate_register(); + self.brillig_context.memory_op( + source_vector.pointer, + index, + source_pointer_at_index, + BinaryIntOp::Add, + ); + + // Compute the target pointer after the inserted elements + let target_pointer_after_index = self.brillig_context.allocate_register(); + self.brillig_context.memory_op( + target_vector.pointer, + index, + target_pointer_after_index, + BinaryIntOp::Add, + ); + self.brillig_context.usize_op_in_place( + target_pointer_after_index, + BinaryIntOp::Add, + items.len(), + ); + + // Compute the number of elements to the right of the index + let item_count = self.brillig_context.allocate_register(); + self.brillig_context.memory_op(source_vector.size, index, item_count, BinaryIntOp::Sub); + + // Copy the elements to the right of the index + self.brillig_context.copy_array_instruction( + source_pointer_at_index, + target_pointer_after_index, + item_count, + ); + + // Write the items to insert starting at the index + for (subitem_index, variable) in items.iter().enumerate() { + let target_index = self.brillig_context.make_constant(subitem_index.into()); + self.brillig_context.memory_op(target_index, index, target_index, BinaryIntOp::Add); + self.store_variable_in_array(target_vector.pointer, target_index, *variable); + self.brillig_context.deallocate_register(target_index); + } + + self.brillig_context.deallocate_register(source_pointer_at_index); + self.brillig_context.deallocate_register(target_pointer_after_index); + self.brillig_context.deallocate_register(item_count); + } + + pub(crate) fn slice_remove_operation( + &mut self, + target_vector: HeapVector, + source_vector: HeapVector, + index: RegisterIndex, + removed_items: &[RegisterOrMemory], + ) { + // First we need to allocate the target vector decrementing the size by removed_items.len() + self.brillig_context.usize_op( + source_vector.size, + target_vector.size, + BinaryIntOp::Sub, + removed_items.len(), + ); + self.brillig_context.allocate_array_instruction(target_vector.pointer, target_vector.size); + + // Copy the elements to the left of the index + self.brillig_context.copy_array_instruction( + source_vector.pointer, + target_vector.pointer, + index, + ); + + // Compute the source pointer after the removed items + let source_pointer_after_index = self.brillig_context.allocate_register(); + self.brillig_context.memory_op( + source_vector.pointer, + index, + source_pointer_after_index, + BinaryIntOp::Add, + ); + self.brillig_context.usize_op_in_place( + source_pointer_after_index, + BinaryIntOp::Add, + removed_items.len(), + ); + + // Compute the target pointer at the index + let target_pointer_at_index = self.brillig_context.allocate_register(); + self.brillig_context.memory_op( + target_vector.pointer, + index, + target_pointer_at_index, + BinaryIntOp::Add, + ); + + // Compute the number of elements to the right of the index + let item_count = self.brillig_context.allocate_register(); + self.brillig_context.memory_op(source_vector.size, index, item_count, BinaryIntOp::Sub); + self.brillig_context.usize_op_in_place(item_count, BinaryIntOp::Sub, removed_items.len()); + + // Copy the elements to the right of the index + self.brillig_context.copy_array_instruction( + source_pointer_after_index, + target_pointer_at_index, + item_count, + ); + + // Get the removed items + for (subitem_index, variable) in removed_items.iter().enumerate() { + let target_index = self.brillig_context.make_constant(subitem_index.into()); + self.brillig_context.memory_op(target_index, index, target_index, BinaryIntOp::Add); + self.retrieve_variable_from_array(source_vector.pointer, target_index, *variable); + self.brillig_context.deallocate_register(target_index); + } + + self.brillig_context.deallocate_register(source_pointer_after_index); + self.brillig_context.deallocate_register(target_pointer_at_index); + self.brillig_context.deallocate_register(item_count); + } + + pub(crate) fn convert_array_or_vector_to_vector( + &mut self, + source_variable: RegisterOrMemory, + ) -> HeapVector { + match source_variable { + RegisterOrMemory::HeapVector(source_vector) => source_vector, + RegisterOrMemory::HeapArray(source_array) => { + self.brillig_context.array_to_vector(&source_array) + } + _ => unreachable!("ICE: unsupported slice push back source {:?}", source_variable), + } } } #[cfg(test)] mod tests { + use std::collections::HashMap; use std::vec; use acvm::acir::brillig::{HeapVector, Value}; - use acvm::brillig_vm::brillig::RegisterIndex; + use acvm::brillig_vm::brillig::{RegisterIndex, RegisterOrMemory}; - use crate::brillig::brillig_gen::brillig_slice_ops::{ - slice_insert_operation, slice_pop_back_operation, slice_pop_front_operation, - slice_push_back_operation, slice_push_front_operation, slice_remove_operation, - }; + use crate::brillig::brillig_gen::brillig_block::BrilligBlock; + use crate::brillig::brillig_gen::brillig_fn::FunctionContext; use crate::brillig::brillig_ir::artifact::BrilligParameter; use crate::brillig::brillig_ir::tests::{create_and_run_vm, create_context}; + use crate::brillig::brillig_ir::BrilligContext; + use crate::ssa::ir::map::Id; + + fn create_test_environment() -> (FunctionContext, BrilligContext) { + let function_context = FunctionContext { + function_id: Id::test_new(0), + ssa_value_to_brillig_variable: HashMap::new(), + }; + let brillig_context = create_context(); + (function_context, brillig_context) + } + + fn create_brillig_block<'a>( + function_context: &'a mut FunctionContext, + brillig_context: &'a mut BrilligContext, + ) -> BrilligBlock<'a> { + BrilligBlock { function_context, block_id: Id::test_new(0), brillig_context } + } #[test] fn test_slice_push_operation() { @@ -244,7 +357,7 @@ mod tests { BrilligParameter::Simple, ]; - let mut context = create_context(); + let (mut function_context, mut context) = create_test_environment(); // Allocate the parameters let array_pointer = context.allocate_register(); @@ -257,19 +370,19 @@ mod tests { let copied_array_pointer = context.allocate_register(); let copied_array_size = context.allocate_register(); + let mut block = create_brillig_block(&mut function_context, &mut context); + if push_back { - slice_push_back_operation( - &mut context, + block.slice_push_back_operation( HeapVector { pointer: copied_array_pointer, size: copied_array_size }, HeapVector { pointer: array_pointer, size: array_size }, - item_to_insert, + &[RegisterOrMemory::RegisterIndex(item_to_insert)], ); } else { - slice_push_front_operation( - &mut context, + block.slice_push_front_operation( HeapVector { pointer: copied_array_pointer, size: copied_array_size }, HeapVector { pointer: array_pointer, size: array_size }, - item_to_insert, + &[RegisterOrMemory::RegisterIndex(item_to_insert)], ); } @@ -337,7 +450,7 @@ mod tests { BrilligParameter::Simple, ]; - let mut context = create_context(); + let (mut function_context, mut context) = create_test_environment(); // Allocate the parameters let array_pointer = context.allocate_register(); @@ -351,19 +464,19 @@ mod tests { let copied_array_size = context.allocate_register(); + let mut block = create_brillig_block(&mut function_context, &mut context); + if pop_back { - slice_pop_back_operation( - &mut context, + block.slice_pop_back_operation( HeapVector { pointer: copied_array_pointer, size: copied_array_size }, HeapVector { pointer: array_pointer, size: array_size }, - removed_item, + &[RegisterOrMemory::RegisterIndex(removed_item)], ); } else { - slice_pop_front_operation( - &mut context, + block.slice_pop_front_operation( HeapVector { pointer: copied_array_pointer, size: copied_array_size }, HeapVector { pointer: array_pointer, size: array_size }, - removed_item, + &[RegisterOrMemory::RegisterIndex(removed_item)], ); } @@ -434,7 +547,7 @@ mod tests { BrilligParameter::Simple, ]; - let mut context = create_context(); + let (mut function_context, mut context) = create_test_environment(); // Allocate the parameters let array_pointer = context.allocate_register(); @@ -449,12 +562,13 @@ mod tests { let copied_array_size = context.allocate_register(); - slice_insert_operation( - &mut context, + let mut block = create_brillig_block(&mut function_context, &mut context); + + block.slice_insert_operation( HeapVector { pointer: copied_array_pointer, size: copied_array_size }, HeapVector { pointer: array_pointer, size: array_size }, index_to_insert, - item_to_insert, + &[RegisterOrMemory::RegisterIndex(item_to_insert)], ); context.return_instruction(&[copied_array_pointer, copied_array_size]); @@ -556,7 +670,7 @@ mod tests { BrilligParameter::Simple, ]; - let mut context = create_context(); + let (mut function_context, mut context) = create_test_environment(); // Allocate the parameters let array_pointer = context.allocate_register(); @@ -571,12 +685,13 @@ mod tests { let copied_array_size = context.allocate_register(); - slice_remove_operation( - &mut context, + let mut block = create_brillig_block(&mut function_context, &mut context); + + block.slice_remove_operation( HeapVector { pointer: copied_array_pointer, size: copied_array_size }, HeapVector { pointer: array_pointer, size: array_size }, index_to_insert, - removed_item, + &[RegisterOrMemory::RegisterIndex(removed_item)], ); context.return_instruction(&[copied_array_pointer, copied_array_size, removed_item]); diff --git a/crates/noirc_evaluator/src/brillig/brillig_ir.rs b/crates/noirc_evaluator/src/brillig/brillig_ir.rs index 4471d507579..047e8b7edf8 100644 --- a/crates/noirc_evaluator/src/brillig/brillig_ir.rs +++ b/crates/noirc_evaluator/src/brillig/brillig_ir.rs @@ -548,24 +548,6 @@ impl BrilligContext { self.push_opcode(BrilligOpcode::Store { destination_pointer, source }); } - pub(crate) fn length_of_variable_instruction( - &mut self, - variable: RegisterOrMemory, - result: RegisterIndex, - ) { - match variable { - RegisterOrMemory::RegisterIndex(_) => { - self.const_instruction(result, 1_u128.into()); - } - RegisterOrMemory::HeapArray(HeapArray { size, .. }) => { - self.const_instruction(result, size.into()); - } - RegisterOrMemory::HeapVector(HeapVector { size, .. }) => { - self.mov_instruction(result, size); - } - } - } - /// Stores a variable by saving its registers to memory pub(crate) fn store_variable_instruction( &mut self, From aad82c39b054ef8a02e78341f559999e576ffdf1 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Mon, 7 Aug 2023 16:31:40 +0100 Subject: [PATCH 15/18] chore: Use helper functions for getting values of `AcirVar`s (#2194) * chore: Use helper functions for getting values of `AcirVar`s * chore: reorganise code --- .../src/ssa/acir_gen/acir_ir/acir_variable.rs | 107 ++++++------------ 1 file changed, 37 insertions(+), 70 deletions(-) diff --git a/crates/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs b/crates/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs index 2ce2cc95362..03dc414f3fb 100644 --- a/crates/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs +++ b/crates/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs @@ -151,7 +151,7 @@ impl AcirContext { self.add_data(var_data) } - pub(crate) fn get_location(&mut self) -> Option { + pub(crate) fn get_location(&self) -> Option { self.acir_ir.current_location } @@ -159,6 +159,21 @@ impl AcirContext { self.acir_ir.current_location = location; } + /// Converts an [`AcirVar`] to a [`Witness`] + fn var_to_witness(&mut self, var: AcirVar) -> Result { + let expression = self.var_to_expression(var)?; + Ok(self.acir_ir.get_or_create_witness(&expression)) + } + + /// Converts an [`AcirVar`] to an [`Expression`] + fn var_to_expression(&self, var: AcirVar) -> Result { + let var_data = match self.vars.get(&var) { + Some(var_data) => var_data, + None => return Err(InternalError::UndeclaredAcirVar { location: self.get_location() }), + }; + Ok(var_data.to_expression().into_owned()) + } + /// True if the given AcirVar refers to a constant one value pub(crate) fn is_constant_one(&self, var: &AcirVar) -> bool { match self.vars[var] { @@ -246,11 +261,8 @@ impl AcirContext { /// Returns an `AcirVar` that is `1` if `lhs` equals `rhs` and /// 0 otherwise. pub(crate) fn eq_var(&mut self, lhs: AcirVar, rhs: AcirVar) -> Result { - let lhs_data = &self.vars[&lhs]; - let rhs_data = &self.vars[&rhs]; - - let lhs_expr = lhs_data.to_expression(); - let rhs_expr = rhs_data.to_expression(); + let lhs_expr = self.var_to_expression(lhs)?; + let rhs_expr = self.var_to_expression(rhs)?; let is_equal_witness = self.acir_ir.is_equal(&lhs_expr, &rhs_expr); let result_var = self.add_data(AcirVarData::Witness(is_equal_witness)); @@ -479,13 +491,9 @@ impl AcirContext { bit_size: u32, predicate: AcirVar, ) -> Result<(AcirVar, AcirVar), RuntimeError> { - let lhs_data = &self.vars[&lhs]; - let rhs_data = &self.vars[&rhs]; - let predicate_data = &self.vars[&predicate]; - - let lhs_expr = lhs_data.to_expression(); - let rhs_expr = rhs_data.to_expression(); - let predicate_expr = predicate_data.to_expression(); + let lhs_expr = self.var_to_expression(lhs)?; + let rhs_expr = self.var_to_expression(rhs)?; + let predicate_expr = self.var_to_expression(predicate)?; let (quotient, remainder) = self.acir_ir.euclidean_division(&lhs_expr, &rhs_expr, bit_size, &predicate_expr)?; @@ -500,24 +508,15 @@ impl AcirContext { /// and |remainder| < |rhs| /// and remainder has the same sign than lhs /// Note that this is not the euclidian division, where we have instead remainder < |rhs| - /// - /// - /// - /// - fn signed_division_var( &mut self, lhs: AcirVar, rhs: AcirVar, bit_size: u32, ) -> Result<(AcirVar, AcirVar), RuntimeError> { - let lhs_data = &self.vars[&lhs].clone(); - let rhs_data = &self.vars[&rhs].clone(); + let l_witness = self.var_to_witness(lhs)?; + let r_witness = self.var_to_witness(rhs)?; - let lhs_expr = lhs_data.to_expression(); - let rhs_expr = rhs_data.to_expression(); - let l_witness = self.acir_ir.get_or_create_witness(&lhs_expr); - let r_witness = self.acir_ir.get_or_create_witness(&rhs_expr); assert_ne!(bit_size, 0, "signed integer should have at least one bit"); let (q, r) = self.acir_ir.signed_division(&l_witness.into(), &r_witness.into(), bit_size)?; @@ -571,18 +570,7 @@ impl AcirContext { /// Converts the `AcirVar` to a `Witness` if it hasn't been already, and appends it to the /// `GeneratedAcir`'s return witnesses. pub(crate) fn return_var(&mut self, acir_var: AcirVar) -> Result<(), InternalError> { - let acir_var_data = match self.vars.get(&acir_var) { - Some(acir_var_data) => acir_var_data, - None => return Err(InternalError::UndeclaredAcirVar { location: self.get_location() }), - }; - // TODO: Add caching to prevent expressions from being needlessly duplicated - let witness = match acir_var_data { - AcirVarData::Const(constant) => { - self.acir_ir.get_or_create_witness(&Expression::from(*constant)) - } - AcirVarData::Expr(expr) => self.acir_ir.get_or_create_witness(expr), - AcirVarData::Witness(witness) => *witness, - }; + let witness = self.var_to_witness(acir_var)?; self.acir_ir.push_return_witness(witness); Ok(()) } @@ -593,11 +581,9 @@ impl AcirContext { variable: AcirVar, numeric_type: &NumericType, ) -> Result { - let data = &self.vars[&variable]; match numeric_type { NumericType::Signed { bit_size } | NumericType::Unsigned { bit_size } => { - let data_expr = data.to_expression(); - let witness = self.acir_ir.get_or_create_witness(&data_expr); + let witness = self.var_to_witness(variable)?; self.acir_ir.range_constraint(witness, *bit_size)?; } NumericType::NativeField => { @@ -616,8 +602,7 @@ impl AcirContext { rhs: u32, max_bit_size: u32, ) -> Result { - let lhs_data = &self.vars[&lhs]; - let lhs_expr = lhs_data.to_expression(); + let lhs_expr = self.var_to_expression(lhs)?; // 2^{rhs} let divisor = FieldElement::from(2_i128).pow(&FieldElement::from(rhs as i128)); @@ -641,17 +626,12 @@ impl AcirContext { bit_size: u32, predicate: AcirVar, ) -> Result { - let lhs_data = &self.vars[&lhs]; - let rhs_data = &self.vars[&rhs]; - - let lhs_expr = lhs_data.to_expression(); - let rhs_expr = rhs_data.to_expression(); - - let predicate_data = &self.vars[&predicate]; - let predicate = predicate_data.to_expression().into_owned(); + let lhs_expr = self.var_to_expression(lhs)?; + let rhs_expr = self.var_to_expression(rhs)?; + let predicate_expr = self.var_to_expression(predicate)?; let is_greater_than_eq = - self.acir_ir.more_than_eq_comparison(&lhs_expr, &rhs_expr, bit_size, predicate)?; + self.acir_ir.more_than_eq_comparison(&lhs_expr, &rhs_expr, bit_size, predicate_expr)?; Ok(self.add_data(AcirVarData::Witness(is_greater_than_eq))) } @@ -736,13 +716,10 @@ impl AcirContext { for input in inputs { let mut single_val_witnesses = Vec::new(); for (input, typ) in input.flatten() { - let var_data = &self.vars[&input]; - // Intrinsics only accept Witnesses. This is not a limitation of the // intrinsics, its just how we have defined things. Ideally, we allow // constants too. - let expr = var_data.to_expression(); - let witness = self.acir_ir.get_or_create_witness(&expr); + let witness = self.var_to_witness(input)?; let num_bits = typ.bit_size(); single_val_witnesses.push(FunctionInput { witness, num_bits }); } @@ -785,10 +762,10 @@ impl AcirContext { } }; - let input_expr = &self.vars[&input_var].to_expression(); + let input_expr = self.var_to_expression(input_var)?; let bit_size = u32::BITS - (radix - 1).leading_zeros(); - let limbs = self.acir_ir.radix_le_decompose(input_expr, radix, limb_count, bit_size)?; + let limbs = self.acir_ir.radix_le_decompose(&input_expr, radix, limb_count, bit_size)?; let mut limb_vars = vecmap(limbs, |witness| { let witness = self.add_data(AcirVarData::Witness(witness)); @@ -873,9 +850,7 @@ impl AcirContext { outputs: Vec, ) -> Result, InternalError> { let b_inputs = try_vecmap(inputs, |i| match i { - AcirValue::Var(var, _) => { - Ok(BrilligInputs::Single(self.vars[&var].to_expression().into_owned())) - } + AcirValue::Var(var, _) => Ok(BrilligInputs::Single(self.var_to_expression(var)?)), AcirValue::Array(vars) => { let mut var_expressions: Vec = Vec::new(); for var in vars { @@ -904,7 +879,7 @@ impl AcirContext { acir_value } }); - let predicate = self.vars[&predicate].to_expression().into_owned(); + let predicate = self.var_to_expression(predicate)?; self.acir_ir.brillig(Some(predicate), code, b_inputs, b_outputs); Ok(outputs_var) @@ -917,7 +892,7 @@ impl AcirContext { ) -> Result<(), InternalError> { match input { AcirValue::Var(var, _) => { - var_expressions.push(self.vars[&var].to_expression().into_owned()); + var_expressions.push(self.var_to_expression(var)?); } AcirValue::Array(vars) => { for var in vars { @@ -988,7 +963,7 @@ impl AcirContext { ) -> Result, RuntimeError> { let len = inputs.len(); // Convert the inputs into expressions - let inputs_expr = vecmap(inputs, |input| self.vars[&input].to_expression().into_owned()); + let inputs_expr = try_vecmap(inputs, |input| self.var_to_expression(input))?; // Generate output witnesses let outputs_witness = vecmap(0..len, |_| self.acir_ir.next_witness_index()); let output_expr = @@ -1007,14 +982,6 @@ impl AcirContext { Ok(outputs_var) } - /// Converts an AcirVar to a Witness - fn var_to_witness(&mut self, var: AcirVar) -> Result { - let var_data = match self.vars.get(&var) { - Some(var_data) => var_data, - None => return Err(InternalError::UndeclaredAcirVar { location: self.get_location() }), - }; - Ok(self.acir_ir.get_or_create_witness(&var_data.to_expression())) - } /// Constrain lhs to be less than rhs fn less_than_constrain( From 14cbdbc1055ce7efe5d31bb02707c9a601ee7745 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Mon, 7 Aug 2023 16:36:36 +0100 Subject: [PATCH 16/18] feat: Only create new witnesses for distinctiveness when duplicates exist (#2191) * feat: reuse witnesses where possible while guaranteeing distinctiveness * Update crates/noirc_evaluator/src/ssa/acir_gen/mod.rs --- .../distinct_keyword/src/main.nr | 4 +-- .../target/distinct_keyword.json | 2 +- .../distinct_keyword/target/witness.tr | Bin 56 -> 54 bytes .../noirc_evaluator/src/ssa/acir_gen/mod.rs | 32 +++++++++++------- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/crates/nargo_cli/tests/execution_success/distinct_keyword/src/main.nr b/crates/nargo_cli/tests/execution_success/distinct_keyword/src/main.nr index d84be844d8e..5bf3f7e0975 100644 --- a/crates/nargo_cli/tests/execution_success/distinct_keyword/src/main.nr +++ b/crates/nargo_cli/tests/execution_success/distinct_keyword/src/main.nr @@ -1,4 +1,4 @@ // Example that uses the distinct keyword -fn main(x: pub Field) -> distinct pub [Field;2] { - [x+1, x] +fn main(x: pub Field) -> distinct pub [Field; 3] { + [x+1, x, x] } diff --git a/crates/nargo_cli/tests/execution_success/distinct_keyword/target/distinct_keyword.json b/crates/nargo_cli/tests/execution_success/distinct_keyword/target/distinct_keyword.json index ad8ebce2475..77dc3d9fe1c 100644 --- a/crates/nargo_cli/tests/execution_success/distinct_keyword/target/distinct_keyword.json +++ b/crates/nargo_cli/tests/execution_success/distinct_keyword/target/distinct_keyword.json @@ -1 +1 @@ -{"backend":"acvm-backend-barretenberg","abi":{"parameters":[{"name":"x","type":{"kind":"field"},"visibility":"public"}],"param_witnesses":{"x":[1]},"return_type":{"kind":"array","length":2,"type":{"kind":"field"}},"return_witnesses":[3,4]},"bytecode":"H4sIAAAAAAAA/9WRQQ6AIAwEEfU/LW2lvfkVifj/JxgSTEg8Cgf3srftTnd1zs3uLV99rw7fhFOTRbAx5xgyEh4QLKkAS9oUFUXlDEqUlTVasgiGTBkvMbpqmO/YaySz78g89+sFf9l5GcA8Nf6wl9+WWzcyyYCuDAMAAA==","proving_key":null,"verification_key":null} \ No newline at end of file +{"backend":"acvm-backend-barretenberg","abi":{"parameters":[{"name":"x","type":{"kind":"field"},"visibility":"public"}],"param_witnesses":{"x":[1]},"return_type":{"kind":"array","length":3,"type":{"kind":"field"}},"return_witnesses":[2,1,3]},"bytecode":"H4sIAAAAAAAA/9VPOQ7AIAzj6IMSkkCy9StFhf8/oQtISB3LUi8+Bss+nHPBvTGzczB8A/qliyAzt5IaEl6QrKoAS82KiqJyJyVqylqsWgFDpoZdjPooCxt3/eVz3LcL5l+/cFx0GP4Bi8kGuhwCAAA=","proving_key":null,"verification_key":null} \ No newline at end of file diff --git a/crates/nargo_cli/tests/execution_success/distinct_keyword/target/witness.tr b/crates/nargo_cli/tests/execution_success/distinct_keyword/target/witness.tr index d79dfba9359eea58f2ba317b1ce984af616058b2..57b9214a4e1326fb4bd31b595199609f186f11da 100644 GIT binary patch literal 54 zcmb2|=3oE;rvGdE961>nIGC@B3Yj$g4c5$HE;qRG+Tz5b&AZ;)AF5c#vT-$|%`E%v HZ-A-+%9|5_ literal 56 zcmb2|=3oE;rvGdEPjWIaa2(#lCRD=keZH5Y`G!WP_(lm`o7KPnDYHEHV%^1a { - // Create a witness for each return witness we have - // to guarantee that the return witnesses are distinct - let distinct_return_witness: Vec<_> = generated_acir - .return_witnesses - .clone() - .into_iter() - .map(|return_witness| { - generated_acir - .create_witness_for_expression(&Expression::from(return_witness)) - }) - .collect(); + let mut distinct_return_witness: Vec = + Vec::with_capacity(generated_acir.return_witnesses.len()); + + for mut return_witness in generated_acir.return_witnesses.clone() { + // If witness has already been used then create a new one + // to guarantee that the return witnesses are distinct + if distinct_return_witness.contains(&return_witness) { + return_witness = generated_acir + .create_witness_for_expression(&Expression::from(return_witness)); + } + + distinct_return_witness.push(return_witness); + } generated_acir.return_witnesses = distinct_return_witness; Ok(generated_acir) @@ -1121,7 +1127,7 @@ impl Context { #[cfg(test)] mod tests { - use std::{rc::Rc, collections::HashMap}; + use std::{collections::HashMap, rc::Rc}; use acvm::{ acir::{ From a56db3ec9b20de587735e2f002be5c355c6b6b83 Mon Sep 17 00:00:00 2001 From: Alex Vitkov <44268717+alexvitkov@users.noreply.github.com> Date: Mon, 7 Aug 2023 19:04:31 +0300 Subject: [PATCH 17/18] fix: Fix an ICE when reassigning a mutable lambda variable to one with a different environment type (#2172) * fix: don't allow lambda reassignment if closure types dont match * fix: add test for bad lambda reassignment * fix: cargo fmt & clippy * fix: alternate approach --------- Co-authored-by: Alex Vitkov --- .../fail/different-lambda-env-reassign-disallow.nr | 9 +++++++++ crates/noirc_frontend/src/hir_def/types.rs | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 crates/nargo_cli/tests/compile_tests_data/fail/different-lambda-env-reassign-disallow.nr diff --git a/crates/nargo_cli/tests/compile_tests_data/fail/different-lambda-env-reassign-disallow.nr b/crates/nargo_cli/tests/compile_tests_data/fail/different-lambda-env-reassign-disallow.nr new file mode 100644 index 00000000000..7bac2367846 --- /dev/null +++ b/crates/nargo_cli/tests/compile_tests_data/fail/different-lambda-env-reassign-disallow.nr @@ -0,0 +1,9 @@ +fn bad() { + let a: i32 = 100; + let b: i32 = 200; + + let mut f = || a; + + // this should fail with a type error, since the closures have different environments & types + f = || a + b; +} \ No newline at end of file diff --git a/crates/noirc_frontend/src/hir_def/types.rs b/crates/noirc_frontend/src/hir_def/types.rs index d77b8033ba1..587001bfafc 100644 --- a/crates/noirc_frontend/src/hir_def/types.rs +++ b/crates/noirc_frontend/src/hir_def/types.rs @@ -1206,12 +1206,14 @@ impl Type { } } - (Function(params_a, ret_a, _env_a), Function(params_b, ret_b, _env_b)) => { + (Function(params_a, ret_a, env_a), Function(params_b, ret_b, env_b)) => { if params_a.len() == params_b.len() { for (a, b) in params_a.iter().zip(params_b.iter()) { a.try_unify(b, span)?; } + env_a.try_unify(env_b, span)?; + ret_b.try_unify(ret_a, span) } else { Err(SpanKind::None) @@ -1413,12 +1415,14 @@ impl Type { } } - (Function(params_a, ret_a, _env_a), Function(params_b, ret_b, _env_b)) => { + (Function(params_a, ret_a, env_a), Function(params_b, ret_b, env_b)) => { if params_a.len() == params_b.len() { for (a, b) in params_a.iter().zip(params_b) { a.is_subtype_of(b, span)?; } + env_a.is_subtype_of(env_b, span)?; + // return types are contravariant, so this must be ret_b <: ret_a instead of the reverse ret_b.is_subtype_of(ret_a, span) } else { From 44df932d36156539d5f03a49a758e1894748590c Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Mon, 7 Aug 2023 17:18:06 +0100 Subject: [PATCH 18/18] chore: Remove symlink and dummy config file (#2200) chore: removed symlink and dummy config file --- crates/nargo_cli/tests/execution_success/config.toml | 3 --- crates/nargo_cli/tests/test_data | 1 - 2 files changed, 4 deletions(-) delete mode 100644 crates/nargo_cli/tests/execution_success/config.toml delete mode 120000 crates/nargo_cli/tests/test_data diff --git a/crates/nargo_cli/tests/execution_success/config.toml b/crates/nargo_cli/tests/execution_success/config.toml deleted file mode 100644 index 3f16e941ba9..00000000000 --- a/crates/nargo_cli/tests/execution_success/config.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Dummy file included for backwards compatibility -exclude = [] -fail = [] diff --git a/crates/nargo_cli/tests/test_data b/crates/nargo_cli/tests/test_data deleted file mode 120000 index ce80163f960..00000000000 --- a/crates/nargo_cli/tests/test_data +++ /dev/null @@ -1 +0,0 @@ -execution_success \ No newline at end of file