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

--profile option to cargo openvm build doesn't do anything #1141

Closed
matthiasgoergens opened this issue Dec 30, 2024 · 3 comments · Fixed by #1143
Closed

--profile option to cargo openvm build doesn't do anything #1141

matthiasgoergens opened this issue Dec 30, 2024 · 3 comments · Fixed by #1143

Comments

@matthiasgoergens
Copy link

matthiasgoergens commented Dec 30, 2024

struct BuildArgs has an entry profile but it's not connected to anything.

struct GuestOptions has an entry profile, but it's always the default (which is release), and never set anywhere.

I suggest we should somehow connect the two, and perhaps set up a test or two?

As a workaround setting the environment variable OPENVM_BUILD_DEBUG="1" works to get the dev build. But apart from dev and release no other profiles are available at the moment.

@jonathanpwang
Copy link
Contributor

Good catch, thanks! Will fix ASAP

@matthiasgoergens
Copy link
Author

matthiasgoergens commented Dec 30, 2024

Thanks for the quick fix!

Btw, is there any way to run clippy on the guest program? For my project I'm doing that by manually running it, but the right incantations for that might change over time and it's rather tedious.

(And clippy isn't the only thing you might want to run. Perhaps we can have a way to run an (almost) arbitrary cargo command in the right context? At least cargo check is another useful one.)

@jonathanpwang
Copy link
Contributor

jonathanpwang commented Dec 31, 2024

Yea so guest crates are still normal Rust crates: you should still be able to run normal cargo commands like cargo check or cargo clippy directly. It's just that cargo build will build for your host (e.g., x86, aarch) target, whereas cargo openvm build adds extra flags to build for the zkVM target.

So you should be able to do all the normal things with any Rust project. We don't add certain guest crates to our workspace just to keep some separation since those guest programs are for testing.

If you run into any problems with the above, feel free to ask in Telegram! Or open another github issue, and we'll try to either add to the book or update functionality to support it.

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 a pull request may close this issue.

2 participants