Build.rs: "cargo:" vs "cargo::" prefix

I see official Cargo build script reference docs using cargo:: prefix for Cargo instructions, and only that it seems. However, many articles/answers all over the Internet use cargo: prefix for what seems to be the same purpose. I tried both of them and at least for rustc-link-search they both seem to work.
So what is a difference between single colon and double colon in the prefix?

See the note on Outputs of the Build Script

MSRV: 1.77 is required for cargo::KEY=VALUE syntax. To support older versions, use the cargo:KEY=VALUE syntax.

2 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.