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

Pre-build forge ffi within the build script #85

Closed
wants to merge 2 commits into from

Conversation

capossele
Copy link
Contributor

With this addition, running cargo build from the root folder results in also building the forge ffi cli of the risc0-ethereum crate.

Solves #83

@capossele capossele self-assigned this Mar 5, 2024
@nategraf
Copy link
Contributor

nategraf commented Mar 6, 2024

Would it be possible to instead declare the ffi CLI a a dev dependency of risc0-ethereum-contracts, or possibly of the template workspace? I think this would be a cleaner way to achieve the same results, unless it doesn't work for some reason.

@capossele
Copy link
Contributor Author

Would it be possible to instead declare the ffi CLI a a dev dependency of risc0-ethereum-contracts, or possibly of the template workspace? I think this would be a cleaner way to achieve the same results, unless it doesn't work for some reason.

Yeah I've tried a couple of different approaches similar to what you have suggested but they were all unsuccessful mainly because cargo does not really like working with two different virtual workspaces

@nategraf
Copy link
Contributor

nategraf commented Mar 8, 2024

Hmmmm... maybe we can address this issue, and the issue with the location of Elf.sol and ImageID.sol by adding a Forge remapping as part of build.rs to point into the correct folder in the target directory, where the source code for both risc0-ethereum-contracts and risc0-forge-ffi will be cloned. If this works, it could also potentially allow us to drop risc0-ethereum-contracts as a submodule. It's a bit speculative, but I think worth trying.

@capossele capossele self-assigned this May 15, 2024
Eduardogbg added a commit to taralli-labs/risc0-foundry-template that referenced this pull request May 15, 2024
@capossele
Copy link
Contributor Author

Closing for now, I'll reopen once risc0/risc0-ethereum#120 gets merged

@capossele capossele closed this May 17, 2024
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