cd to the rust project which you want to use.
cd folder_nameBuild the Solana Rust Program using
cargo build-bpfOnce built successfully without any error .so of the program will be added to the /target/deploy folder. You can deploy this to solana cluster using.
solana program deploy ./target/deploy/file_name.soOnce successfully deployed it will return the programId of the Solana Program.