Path to Cargo on windows-latest?

I’ve got a repository containing Rust code, and I have working builds for it on ubuntu and macOS. I’m trying to add Windows CI: Comparing · abetterinternet/crustls · GitHub.

The documentation for the Windows environment says it has Rust installed:

However, when my Action runs I get an error that cargo is not found:

Run make CC=clang test
cbindgen --lang C > src/crustls.h
WARN: Skip crustls::RUSTLS_CRATE_VERSION - (not `pub`).
mkdir -p target
clang -o target/main.o -c src/main.c -Werror -Wall -Wextra -Wpedantic -g
cargo build 
process_begin: CreateProcess(NULL, cargo build, ...) failed.
make (e=2): The system cannot find the file specified.

mingw32-make: *** [Makefile:33: target/debug/libcrustls.a] Error 2
Error: Process completed with exit code 2.

Any tips on how to use the install cargo?


You should be able to run Cargo simply by running the cargo command.

If I execute where.exe cargo, then it returns the following path:

I also performed a full search for cargo.exe on the C:\ drive with
Get-ChildItem -Path C:\ -Filter cargo.exe -Recurse -ErrorAction SilentlyContinue -Force and found it in:

  • C:\Rust.cargo\bin
  • C:\Rust.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin