Skip to main content

emit_plan

Function emit_plan 

Source
pub fn emit_plan<P>(config_path: &str) -> Result<(), CuError>
where P: CuPlanner,
Expand description

Resolve an out-of-tree CuPlanner for config_path and write the resulting step orders where #[copper_runtime] picks them up.

Call it from the application’s build.rs:

fn main() {
    cu29_build::setup();
    cu29::planner::emit_plan::<my_planners::Alphabetical>("copperconfig.ron").unwrap();
}

config_path is relative to the crate root, like the macro’s config attribute. Honors the crate’s Cargo feature set (CARGO_CFG_FEATURE) like #[copper_runtime] does.