-
Notifications
You must be signed in to change notification settings - Fork 174
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
Change Default Build Options #138
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
/// Build artifacts with the release profile. Equivalent to "--profile release". | ||
#[arg(short, name = "r", conflicts_with = "profile")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you think --profile=release
isn't sufficient? This is also reflected in the code as it conflicts.
--profile
is explicit, --release
for usual cargo is for distinction between debug and optimized builds, in our case it's more involved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same with prove command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was just looking to retain parity with the previous args (at least for cargo nexus run
). Happy to remove if we want the user to be fully explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that release
doesn't work as intended, I think we should only allow it with explicit usage, at least for the time being.
@govereau wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I agree it should be disabled by default if we think there is a good chance the translation will not work with release. Probably we should go back to a 32-bit encoding so the we don't have this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'll remove the -r
flag.
This PR implements a new build profile,
release-unoptimized
, which is inserted in theCargo.toml
of any new nexus project as well as used for theexamples
folder of thenexus-zkvm
repo. This new profile is equivalent torelease
except withopt-level = 0
.It then:
a) sets the default profile for
cargo nexus run
todev
,b) sets the default profile for
cargo nexus prove
torelease-unoptimized
,c) enables a
--profile
option for both commands.