diff --git a/noir-projects/noir-contracts/extractFunctionAsNoirArtifact.js b/noir-projects/noir-contracts/extractFunctionAsNoirArtifact.js index 842645d860f..52f7ef273c7 100644 --- a/noir-projects/noir-contracts/extractFunctionAsNoirArtifact.js +++ b/noir-projects/noir-contracts/extractFunctionAsNoirArtifact.js @@ -32,6 +32,7 @@ async function main() { debug_symbols: func.debug_symbols, file_map: contractArtifact.file_map, names: ["main"], + brillig_names: func.brillig_names, }; const outputDir = path.dirname(contractArtifactPath); diff --git a/noir/noir-repo/compiler/noirc_driver/src/contract.rs b/noir/noir-repo/compiler/noirc_driver/src/contract.rs index 11fc1bb637a..6253f3e1814 100644 --- a/noir/noir-repo/compiler/noirc_driver/src/contract.rs +++ b/noir/noir-repo/compiler/noirc_driver/src/contract.rs @@ -57,4 +57,7 @@ pub struct ContractFunction { /// Names of the functions in the program. These are used for more informative debugging and benchmarking. pub names: Vec, + + /// Names of the unconstrained functions in the program. + pub brillig_names: Vec, } diff --git a/noir/noir-repo/compiler/noirc_driver/src/lib.rs b/noir/noir-repo/compiler/noirc_driver/src/lib.rs index 99a8e558e15..9b6540ebd74 100644 --- a/noir/noir-repo/compiler/noirc_driver/src/lib.rs +++ b/noir/noir-repo/compiler/noirc_driver/src/lib.rs @@ -469,6 +469,7 @@ fn compile_contract_inner( debug: function.debug, is_unconstrained: modifiers.is_unconstrained, names: function.names, + brillig_names: function.brillig_names, }); } diff --git a/noir/noir-repo/tooling/noirc_artifacts/src/contract.rs b/noir/noir-repo/tooling/noirc_artifacts/src/contract.rs index 1afc7977aec..2b78b647037 100644 --- a/noir/noir-repo/tooling/noirc_artifacts/src/contract.rs +++ b/noir/noir-repo/tooling/noirc_artifacts/src/contract.rs @@ -72,6 +72,8 @@ pub struct ContractFunctionArtifact { deserialize_with = "ProgramDebugInfo::deserialize_compressed_base64_json" )] pub debug_symbols: ProgramDebugInfo, + + pub brillig_names: Vec, } impl From for ContractFunctionArtifact { @@ -82,6 +84,7 @@ impl From for ContractFunctionArtifact { custom_attributes: func.custom_attributes, abi: func.abi, bytecode: func.bytecode, + brillig_names: func.brillig_names, debug_symbols: ProgramDebugInfo { debug_infos: func.debug }, } }