This question has hanging over my head for long time.
How to tell a crate provided by solana org or third party can be imported and use from on-chain code? Is there any flag in cargo.toml file to tell from?
For example, I once try to use the hash function from anchor-syn
crate, but it failed to compile. (See this post)
So I draw a conclusion that anchor-syn
crate is not compile for sbf-solana-solana
target. But it is just my own guest, and unable to justify this.
Another related question, how to set target_os for IDE to high-light the solana code correctly. For example, the vscode in my side obvious not high light the solana code: