Function generate

Source
pub fn generate() -> Result<GenerationResult, ElfMagicError>
Expand description

Main entry point for elf-magic code generation

This function orchestrates the entire process:

  1. Parse manifest configuration from package.metadata.elf-magic
  2. Discover workspace and find Solana programs
  3. Build each program with cargo build-sbf
  4. Generate clean Rust code for ELF exports
  5. Write the generated lib.rs file
  6. Set up incremental build dependencies