Function risc0_build::embed_methods

source ·
pub fn embed_methods()
Expand description

Embeds methods built for RISC-V for use by host-side dependencies.

This method should be called from a package with a [package.metadata.risc0] section including a “methods” property listing the relative paths that contain riscv guest method packages.

To access the generated image IDs and ELF filenames, include the generated

include!(concat!(env!("OUT_DIR"), "/"));

To conform to rust’s naming conventions, the constants are mapped to uppercase. For instance, if you have a method named “my_method”, the image ID and elf contents will be defined as “MY_METHOD_ID” and “MY_METHOD_ELF” respectively.