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

chore(cairo_native): make the starknet-native-compile crate a part of the workspace #3021

Open
wants to merge 1 commit into
base: main-v0.13.4
Choose a base branch
from

Conversation

avi-starkware
Copy link
Collaborator

@avi-starkware avi-starkware commented Dec 30, 2024

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

@avi-starkware avi-starkware changed the base branch from main to main-v0.13.4 December 30, 2024 13:04
@avi-starkware avi-starkware changed the title avi/fix native compiler binary crate chore(cairo_native): make the starknet-native-compile crate a part of the workspace Dec 30, 2024
Copy link
Collaborator

@noaov1 noaov1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @avi-starkware, @meship-starkware, and @Yoni-Starkware)


Cargo.toml line 60 at r1 (raw file):

]

exclude = ["crates/bin/starknet-native-compile"]

What does it mean?

Code quote:

exclude = ["crates/bin/starknet-native-compile"]

crates/bin/starknet-native-compile/src/utils.rs line 1 at r1 (raw file):

#[cfg(feature = "cairo_native")]

Is it necessary, considering the file already has the feature flag above its declaration? 🤔

Code quote:

#[cfg(feature = "cairo_native")]

Copy link
Collaborator

@noaov1 noaov1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @avi-starkware, @meship-starkware, and @Yoni-Starkware)


crates/bin/starknet-native-compile/Cargo.toml line 11 at r1 (raw file):

[features]
cairo_native = [

How do you make sure that the starknet_sierra_compile crate uses this crate with the cairo_native feature flag?

Code quote:

cairo_native = [

Copy link

Benchmark movements:
full_committer_flow performance regressed!
full_committer_flow time: [30.320 ms 30.358 ms 30.397 ms]
change: [+1.8628% +2.0649% +2.2621%] (p = 0.00 < 0.05)
Performance has regressed.
Found 4 outliers among 100 measurements (4.00%)
4 (4.00%) high mild

@avi-starkware avi-starkware force-pushed the avi/fix-native-compiler-binary-crate branch from e03856d to 7a03873 Compare December 30, 2024 13:36
@avi-starkware
Copy link
Collaborator Author

crates/bin/starknet-native-compile/Cargo.toml line 11 at r1 (raw file):

Previously, noaov1 (Noa Oved) wrote…

How do you make sure that the starknet_sierra_compile crate uses this crate with the cairo_native feature flag?

starknet_sierra_compile does not depend on this crate directly it builds it via cargo install, so I just add the feature as an argument in cargo install

@avi-starkware
Copy link
Collaborator Author

Cargo.toml line 60 at r1 (raw file):

Previously, noaov1 (Noa Oved) wrote…

What does it mean?

It just means that the crate is not part of the workspace and will not be compiled automatically when running cargo build from the root dir. I did this to avoid having the entire workspace depend on cairo_native.

Copy link

Benchmark movements:
full_committer_flow performance regressed!
full_committer_flow time: [30.362 ms 30.405 ms 30.452 ms]
change: [+2.0768% +2.4169% +2.7186%] (p = 0.00 < 0.05)
Performance has regressed.
Found 5 outliers among 100 measurements (5.00%)
3 (3.00%) high mild
2 (2.00%) high severe

Copy link
Contributor

@meship-starkware meship-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 5 of 5 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @avi-starkware, @noaov1, and @Yoni-Starkware)

Copy link
Collaborator

@noaov1 noaov1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @avi-starkware and @Yoni-Starkware)

@avi-starkware
Copy link
Collaborator Author

crates/bin/starknet-native-compile/src/utils.rs line 1 at r1 (raw file):

Previously, noaov1 (Noa Oved) wrote…

Is it necessary, considering the file already has the feature flag above its declaration? 🤔

If we don't put this over each import that is only used with the feature flag, we will get an unused_import clippy error

@avi-starkware avi-starkware force-pushed the avi/fix-native-compiler-binary-crate branch 2 times, most recently from 952e380 to a88df6a Compare January 6, 2025 08:08
Copy link
Collaborator

@noaov1 noaov1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 3 of 3 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Yoni-Starkware)

@avi-starkware avi-starkware force-pushed the avi/fix-native-compiler-binary-crate branch 3 times, most recently from 7220231 to 6eb4b19 Compare January 6, 2025 11:40
@avi-starkware avi-starkware force-pushed the avi/fix-native-compiler-binary-crate branch from 6eb4b19 to 8d48934 Compare January 6, 2025 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants