I'm using a simple hello world solana program from https://moralis.io/how-to-write-a-solana-smart-contract
src/lib.rs
use solana_program::{ account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, msg,};entrypoint!(process_instruction);pub fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], instruction_data: &[u8]) -> ProgramResult { msg!("Hello, world!"); Ok(())}
Cargo.toml
[package]name = "hello_world"version = "0.1.0"edition = "2021"# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html[dependencies]solana-program = "1.18.2"[lib]name = "hello_world"crate-type = ["cdylib", "lib"]
$ cargo build-bpferror: package `ahash v0.8.8` cannot be built because it requires rustc 1.72.0 or newer, while the currently active rustc version is 1.68.0-devEither upgrade to rustc 1.72.0 or newer, or usecargo update -p ahash@0.8.8 --precise verwhere `ver` is the latest version of `ahash` supporting rustc 1.68.0-dev
Additional info:
$ cargo-build-sbf --versionsolana-cargo-build-sbf 1.17.22platform-tools v1.37rustc 1.68.0$ rustc --versionrustc 1.72.1 (d5c2e9c34 2023-09-13)$ solana --versionsolana-cli 1.17.22 (src:dbf06e25; feat:3580551090, client:SolanaLabs)