pub fn generate(
idl_path: String,
base_path: String,
languages: Vec<Language>,
) -> Result<()>Expand description
Convert the Anchor IDL at idl_path to a Codama IDL, then drive the
Codama CLI to render clients for each requested language under
<base_path>/<language>.
Implementation notes:
- Conversion happens in-process via [
root_node_from_anchor]. The converted Codama IDL is staged under<base_path>/.codama/idl.jsonalongside a generatedcodama.jsonconfig so the user can inspect or re-run the rendering manually withcodama run --all. - The Codama CLI is invoked as
npx --yes codama run --config <cfg> --allby default. SetANCHOR_CODAMA_CMDto override the binary (e.g. whencodamais already onPATH); arguments are appended as given. Codama itself installs missing renderer packages on demand.