When building a Solana rust program, it does NOT use your normal system's rust compiler (rustc
), instead cargo build-sbf
uses the Solana "platform tools" under the hood which ships a separate version of rustc
which is used to actually compile Solana programs.
- How can you find the version of the platform tools your system will use?
- How can you find the rustc version your program will be compiled with?
My current Solana/Agave CLI version is:
solana --version# output: solana-cli 2.0.0 (src:16de8b75; feat:4288794394, client:Agave)
And my current system's rustc version:
rustc --version# output: rustc 1.78.0 (9b00956e5 2024-04-29)