Skip to main content

locate_codegen_bin

Function locate_codegen_bin 

Source
fn locate_codegen_bin(rust_root: &Path) -> Option<PathBuf>
Expand description

Locate a runnable robonix-codegen binary without going through cargo. Search order:

  1. $ROBONIX_CODEGEN_BIN (override for unusual layouts)
  2. $CARGO_HOME/bin/robonix-codegen / ~/.cargo/bin/robonix-codegen — what cargo install --path crates/robonix-codegen puts there
  3. <rust_root>/target/release/robonix-codegen
  4. <rust_root>/target/debug/robonix-codegen
  5. anything matching robonix-codegen on $PATH

Returns None only when none of those exist; callers fall back to cargo run -p robonix-codegen which keeps a fresh-checkout workflow alive even before the user has installed any binaries.