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

feat: only call entrypoint in zkvm #1611

Merged
merged 1 commit into from
Oct 7, 2024
Merged

Conversation

xJonathanLEI
Copy link
Contributor

Guards call to the user-defined entrypoint by #[cfg(target_os = "zkvm")].

This is helpful to prevent errors when compiling against a non-zkVM target, which can often happen when a program is included in the root workspace and users clone and simply build everything in the workspace.

Ideally, users should exclude zkVM programs when building against the host target, as it's wasted work anyway. However, wasted work is still better than throwing a compilation error directly.

Copy link

github-actions bot commented Oct 7, 2024

SP1 Performance Test Results

Branch: jon/entrypoint_zkvm_only
Commit: 37de311e
Author: xJonathanLEI

program cycles execute (mHz) core (kHZ) compress (KHz) time success
fibonacci 11291 0.18 5.88 0.16 1m11s
ssz-withdrawals 2757356 17.09 64.29 17.57 2m37s
tendermint 12593597 6.60 165.63 63.21 3m21s

@xJonathanLEI xJonathanLEI enabled auto-merge (squash) October 7, 2024 17:52
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need all of these to be pub?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because otherwise they would be marked as unused when building against the host, so you get false positives running say cargo clippy. The template repo has it as pub too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh nice, makes sense.

@xJonathanLEI xJonathanLEI merged commit 1c1f84d into dev Oct 7, 2024
23 checks passed
@xJonathanLEI xJonathanLEI deleted the jon/entrypoint_zkvm_only branch October 7, 2024 23:55
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.

2 participants