To make Rust analyzer target target_os="solana"
try the following:
- Find
active_release_dir
from your config file withcat ~/.config/solana/install/config.yml
(or whatever your config directory is) - Create a
.vscode/settings.json
file in your project workspace and add the following:
{
"rust-analyzer.cargo.target": "sbf-solana-solana",
"rust-analyzer.cargo.extraEnv": {
"CARGO": "<your_active_release_directory>/bin/sdk/sbf/dependencies/platform-tools/rust/bin/cargo",
"RUSTC": "/bin/sdk/sbf/dependencies/platform-tools/rust/bin/rustc"