Skip to main content

generate_crate

Function generate_crate 

Source
pub fn generate_crate(krate: &Crate) -> Result<String, CodegenError>
Expand description

Generate a whole crate’s lib.rs from a lowered DAR: a pub mod tree (package → module → types) where every cross-module and cross-package reference resolves through its qualified path.

§Errors

Returns CodegenError if the generated tokens are not valid Rust.