Before the workshop, make sure you have the correct tools installed and verified. You need:
- Rustup Toolchain
- An editor of your choice (we highly recommmend VSCode + Extensions)
Rustup provides you with all the software to compile and run Rust applications, e.g.
- Cargo - build tool and package manager
rustfmt
- Auto-formatting tool for Rust codeclippy
- Linting for common mistakes
and many more. Rustup also allows you to install different compile targets and multiple toolchains, as well as keeping your toolchains up to date.
After installing, you should have a set of new command line tools available.
Verify your Rust installation:
-
Open a Terminal/Shell of your choice
-
Navigate to a folder you want to use for your Rust projects
-
Enter
$ cargo new installation-test
-
Cargo will create a "Hello World" application for you. Enter the newly created directory
$ cd installation-test
-
Build and run
$ cargo run
If you see compile information and Hello, world!
printed out on your command line, you are ready to go!
If you want to try the samples using Rust with client-side Wasm, please also install wasm-pack
.
Install VS Code for your platform.
We recommend to use the following extensions and tools:
- Rust Analyzer
- CodeLLDB for debugging
- crates
- Just Command Runner including Just support in VSCode
- watchexec
- Optional ones depending on your preferences: