0

I have created a very simple Hello World using anchor framework, rust, and Solana. But I am unable to deploy it, due to rust's version discrepancy.

Refer the below image

enter image description here

I have tried all types of cargo clean, cargo build and rustc update but nothing helped.

I am requesting help.

TIA

1

1 Answer 1

2

You'll probably need to upgrade to the latest solana CLI version

solana-install update

I would also suggest using wsl

As to why the rust cargo tools aren't working:

when you compile using the rust compiler rustc, the end result is specified bytecode, most likely x86. see this answer on SO https://stackoverflow.com/questions/43385142/how-is-rust-compiled-to-machine-code

As you've guessed, you can't run x86 code on the SVM and that what the cargo-sbf does in converting the LLVM-IR (low level virtual machine intermediate representation), into SBF

see also https://www.rareskills.io/post/solana-smart-contract-language

1
  • I am using WSL as well
    – ispostback
    Commented Jul 3 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.