Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Export brillig names in contract functions #8212

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions noir/noir-repo/compiler/noirc_driver/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,

/// Names of the unconstrained functions in the program.
pub brillig_names: Vec<String>,
}
1 change: 1 addition & 0 deletions noir/noir-repo/compiler/noirc_driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ fn compile_contract_inner(
debug: function.debug,
is_unconstrained: modifiers.is_unconstrained,
names: function.names,
brillig_names: function.brillig_names,
});
}

Expand Down
3 changes: 3 additions & 0 deletions noir/noir-repo/tooling/noirc_artifacts/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ pub struct ContractFunctionArtifact {
deserialize_with = "ProgramDebugInfo::deserialize_compressed_base64_json"
)]
pub debug_symbols: ProgramDebugInfo,

pub brillig_names: Vec<String>,
}

impl From<ContractFunction> for ContractFunctionArtifact {
Expand All @@ -82,6 +84,7 @@ impl From<ContractFunction> 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 },
}
}
Expand Down
Loading