This repository helps new Rust developers understand core Rust concepts through labs. Each lab has comments that explain different Rust concepts through examples.
- Setup Ubuntu 22.04 in WSL2
- Setup WSL2 in VSCode
- Setup Rust & VSCode rust-analyzer extension inside WSL2 (Note - Rust VSCode setup instructions are for Windows, but they will work in WSL2 Linux too)
- Setup pre-requisites for Azure/azure-osconfig repo
- Clone and configure the Azure/azure-osconfig repository
git clone https://github.com/Azure/azure-osconfig.git
pushd azure-osconfig
git submodule update --init --recursive
mkdir build && pushd build
cmake ../src -DCMAKE_BUILD_TYPE=Release -Duse_prov_client=ON -Dhsm_type_symm_key=ON -DBUILD_TESTS=OFF
- Install the azure-osconfig
sudo cmake --build . --config Release --target install
- Uncomment the code block in
\src\module\mod.rs
to load modules from/usr/lib/osconfig
and insert them into themodules
HashMap.- Note the move of
path
variable contents to theModule::init()
function. - Note the pass by reference of
name
variable to theself.modules.get()
function. - Note the user of clone() in the
name
variable to theself.modules.insert()
function.
- Note the move of
Labs 1-4 are independent learning labs that do not provide fully end-to-end functionality. Each lab build on top of the previous lab, but they can be run in any order. The labs culminate in a functional Unix Domain Socket based service that dynamically loads and invokes OS modules from the OSConfig repository, used for locally managing Linux Edge devices.
For dev environment setup, the README in platform_lab1
branch has detailed instructions. The other labs assume the same dev environment setup.
The final solution can be run in the platform_labcomplete
branch.