Cargo pass target to shell script

⚓ Rust    📅 2025-08-22    👤 surdeus    👁️ 3      

surdeus

So I have seen cargo-cc and cargo-make

Both are nice and helpful in their own way

But I am looking for an environment variable that tells me the arch of the current target

From that env I can determine which compiler to use ie arm cortex or x86 Linux host or riscv

I cannot seem to find a list of env vars exports by cargo for this purpose that contains for example the target triple or host triple

Can somebody point me to this?

1 post - 1 participant

Read full topic

🏷️ Rust_feed