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

fix: build errors on custom bin target names #1623

Merged

Conversation

xJonathanLEI
Copy link
Contributor

The current ELF-copying behaviour assumes that the built artifact is named the same as the crate itself. This may not be true when using custom project structures.

Usually, when explicitly using a custom structure, devs know that they need to use the --bin option (or the binary field, programmatically). However, sometimes this can happen implicitly. For example, moving src/main.rs to src/bin/hello.rs implicitly creates a bin target named hello. Since this happens without explicitly configuring Cargo.toml, devs may not know they need to use --bin. Also, since it works with the normal cargo build users may expect it also works with cargo prove build.

This PR fixes it by utilizing the target collection logic added in #1620 to accurately identify the full path to the generated ELF.

Copy link

github-actions bot commented Oct 9, 2024

SP1 Performance Test Results

Branch: jon/gro-162-non-standard-bin-target-name-fails-build
Commit: 341a1c82
Author: xJonathanLEI

program cycles execute (mHz) core (kHZ) compress (KHz) time success
fibonacci 11291 0.17 6.15 0.16 1m11s
ssz-withdrawals 2757356 17.16 63.07 17.30 2m40s
tendermint 12593597 6.33 165.89 63.94 3m19s

@xJonathanLEI xJonathanLEI merged commit 613f577 into dev Oct 9, 2024
24 checks passed
@xJonathanLEI xJonathanLEI deleted the jon/gro-162-non-standard-bin-target-name-fails-build branch October 9, 2024 19:07
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