pub fn cargo_bin_maybe_use_path_relative_to_rs(
        relative_path_from_rs: impl AsRef<Path>,
        bin_name: &str,
        features: &[&str],
    ) -> Wasm {
        Wasm::from_location_specified_by_env_var(bin_name, features).unwrap_or_else(|| {
          if env::var("CARGO_MANIFEST_DIR").is_ok() {
            Self::new_from_path_relative_to_rs(relative_path_from_rs).cargo_bin(bin_name, features)
          } else {
              panic!(
                  "No CARGO_MANIFEST_DIR set, but also no _CANISTER env var, while searching for {}",
                  bin_name
              )
          }
        })
    }
/// On CI, returns the pre-compiled binary, found thanks to an env var. The
/// `relative_path_from_rs` argument is unused in this case.
///
/// For local development, compile the canister with cargo, searching for
/// the Cargo.toml of the canister to build thanks to its relative path
/// from rs/.
On CI, returns the pre-compiled binary, found thanks to an env var. The
`relative_path_from_rs` argument is unused in this case.

For local development, compile the canister with cargo, searching for
the Cargo.toml of the canister to build thanks to its relative path
from rs/.
On CI returns the pre - compiled binary found thanks to an env var . The ` relative_path_from_rs ` argument is unused in this case . For local development compile the canister with cargo searching for the Cargo . toml of the canister to build thanks to its relative path from rs / .
pub fn cargo_bin_maybe_use_path_relative_to_rs(
        relative_path_from_rs: impl AsRef<Path>,
        bin_name: &str,
        features: &[&str],
    ) -> Wasm {
        Wasm::from_location_specified_by_env_var(bin_name, features).unwrap_or_else(|| {
          if env::var("CARGO_MANIFEST_DIR").is_ok() {
            Self::new_from_path_relative_to_rs(relative_path_from_rs).cargo_bin(bin_name, features)
          } else {
              panic!(
                  "No CARGO_MANIFEST_DIR set, but also no _CANISTER env var, while searching for {}",
                  bin_name
              )
          }
        })
    }
pub fn cargo_bin_maybe_use_path_relative_to_rs ( relative_path_from_rs : impl AsRef < Path > , bin_name : & str , features : & [ & str ] , ) -> Wasm { Wasm :: from_location_specified_by_env_var ( bin_name , features ) . unwrap_or_else ( | | { if env :: var ( " " ) . is_ok ( ) { Self :: new_from_path_relative_to_rs ( relative_path_from_rs ) . cargo_bin ( bin_name , features ) } else { panic ! ( " " bin_name ) } } ) }
On CI, returns the pre-compiled binary, found thanks to an env var.
On CI returns the pre - compiled binary found thanks to an env var .
relative_path_from_rs
impl AsRef<Path>
bin_name
&str
features
&[&str]
relative_path_from_rs
impl AsRef<Path>
bin_name
&str
features
&[&str]