| Topic | Rust |
|---|---|
| Installation |
Rust: cargo, rustc, clippy
Download Rust.
The download includes rustc - the Rust compiler, cargo - a package manager, and other tools like clippy. It runs on Windows and Linux.
Install the Rust plugin, RLS, from the plugin dropdown in VS Code's left menu bar. It supports
intellisense and debugging. If you run into problems, this tutorial may help:
VSCode with Rust.
|
| Work Flow |
Creating Projects:
In VS Code, open the parent folder where you want to create a new Rust project.
In the terminal issue the command:
That is why the new command ends with --name test_pkg. Without a snake_case name you will
repeatedly get warnings about naming formats.
Open the new folder from the File menu and run or start debugging. When you do not need to
debug, issue the command:
Create a library with the terminal command:
cargo builds the library starter code with test fixtures for unit tests. Once you add
library code and corresponding tests, run them with the terminal command:
Create an /examples folder as a sibling to the /src folder to hold demonstration code
that uses the library and displays results on the terminal. Run it with the command:
|
| Building Applications |
|