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

Make builtin names public outside the crate #849

Merged
merged 1 commit into from
Feb 16, 2023
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
2 changes: 1 addition & 1 deletion src/serde/deserialize_program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub enum BuiltinName {
}

impl BuiltinName {
pub(crate) fn name(&self) -> &'static str {
pub fn name(&self) -> &'static str {
match self {
BuiltinName::output => OUTPUT_BUILTIN_NAME,
BuiltinName::range_check => RANGE_CHECK_BUILTIN_NAME,
Expand Down
14 changes: 7 additions & 7 deletions src/vm/runners/builtin_runner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ pub use output::OutputBuiltinRunner;
pub use range_check::RangeCheckBuiltinRunner;
pub use signature::SignatureBuiltinRunner;

pub(crate) const OUTPUT_BUILTIN_NAME: &str = "output";
pub(crate) const HASH_BUILTIN_NAME: &str = "pedersen";
pub(crate) const RANGE_CHECK_BUILTIN_NAME: &str = "range_check";
pub(crate) const SIGNATURE_BUILTIN_NAME: &str = "ecdsa";
pub(crate) const BITWISE_BUILTIN_NAME: &str = "bitwise";
pub(crate) const EC_OP_BUILTIN_NAME: &str = "ec_op";
pub(crate) const KECCAK_BUILTIN_NAME: &str = "keccak";
pub const OUTPUT_BUILTIN_NAME: &str = "output";
pub const HASH_BUILTIN_NAME: &str = "pedersen";
pub const RANGE_CHECK_BUILTIN_NAME: &str = "range_check";
pub const SIGNATURE_BUILTIN_NAME: &str = "ecdsa";
pub const BITWISE_BUILTIN_NAME: &str = "bitwise";
pub const EC_OP_BUILTIN_NAME: &str = "ec_op";
pub const KECCAK_BUILTIN_NAME: &str = "keccak";

/* NB: this enum is no accident: we may need (and cairo-rs-py *does* need)
* structs containing this to be `Send`. The only two ways to achieve that
Expand Down