Reduce zkVM boilerplate by removing the methods crate

Description

Allow RISC Zero zkVM code to be written without needing to invoke specialized build code for the guest. In particular, after fulfilling this bounty zkVM users will be able to:

This means a successful completion of the bounty will be able to take zkVM guest code, compile it into an ELF binary, and supply that binary to for the host to use all while meeting the above requirements.

We believe that this bounty would be most easily accomplished by using the bindeps artifacts dependency functionality of Cargo, describedhere. Use of bindeps is not a requirement of the bounty, but we do believe it is the most likely path to successfully accomplishing the bounty


In the case of multiple bounty submissions meeting our criteria, we will split the prize among successful submissions in proportion to their completeness and code quality (Minimum 1000$ USDC), as described above. At our discretion, we may award a partial prize to submissions that make substantial but incomplete progress towards fulfilling the four criteria outlined.

We reserve the right to withhold prizing in cases where low-quality submissions do not meet our bounty requirements.

Acceptance criteria

Any successful bounty must meet the 4 requirements specified in the description, namely that zkVM application authors will be able to:

  • build guest code in the same crate and workspace as host code

  • build guest code without using a custom build.rs script

  • freely locate the guest code in whatever part of the source tree is most sensible for their project

  • without reducing the functionality or performance of the zkVM.

We’ll also judge bounties on clarity of code, amenability to future maintenance, and other standard code quality criteria.

Partial submissions are encouraged!

Rewards

5000 reward pool

Resources

The Cargo documentation for bindeps: https://doc.rust-lang.org/cargo/reference/unstable.html#artifact-dependencies
https://doc.rust-lang.org/cargo/reference/unstable.html#artifact-dependencies
Our zkVM documentation: https://docs.rs/risc0-zkvm/latest/risc0_zkvm/
https://docs.rs/risc0-zkvm/latest/risc0_zkvm/
Documentation for our current guest build tools: https://docs.rs/risc0-build/latest/risc0_build/
https://docs.rs/risc0-build/latest/risc0_build/