Hi !
Quick post today on how to install rust in a Raspberry Pi, and later create a hello world test app.
Install Rust
Iโm starting this with the latest updates for Raspberry Pi OS installed.
The command to install rust is this one:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Check the Rust Lang documentation for more details.
Letโs choose the default installation, this may take a couple of minutes.
And now, we can check the rust and cargo versions with the following commands
rustc --version
cargo --version
Hello World project
Now letโs use cargo to create a new project. Iโll name it โDemoBlogPostโ. In the following image, we can check the default contents of the project
- cargo.toml
- src/main.rs
Time to edit the main.rs file. Iโm not a VIM user, so itโs nano time.
And now, time to run the project !
Super fun and literally a great way to use a device like a raspberry pi to learn Rust !
Happy coding!
Greetings
El Bruno
More posts in my blog ElBruno.com.
Top comments (0)