Practical learning · 9 projects
Rust Programming: projects and labs
Learn by doing: labs for each module, a project for each level, a capstone and a project exam. Every step is checked, and your work stays on this device.
Beginner
- Lab1 h · 5 stepsLab: a price board for a chai stallSharma Chai Stall in Pune wants a tiny program that prints its price board and adds up the day's sales. You check your Rust install, create the project with cargo, print the board with placeholders, read your first compiler error, fix it with mut, use constants and shadowing, and finish with a fast release build.Not started
- Lab1.5 h · 5 stepsLab: an electricity bill with slab ratesBuild a small command-line bill calculator for homes in a housing society. Electricity is charged in slabs (example rates: the first 100 units at Rs 3, units 101 to 300 at Rs 5, above 300 at Rs 8, plus a fixed Rs 50). You write the slab function, return the bill as a tuple, summarise six months stored in arrays, and read this month's units from the keyboard without crashing on typos.Not started
- Lab1 h · 4 stepsLab: who owns the kirana order?A kirana shop writes each home-delivery order as a String: one copy stays at the counter, one goes with the delivery rider. You make Rust's ownership rules fail on purpose, read the two E0382 messages (borrow of a moved value, use of a moved value), and fix them with clone and by passing ownership into a function and back out.Not started
- Lab1.5 h · 5 stepsLab: a college marks register with borrowingA college keeps a register of marks for one subject. You write functions that read the marks through a shared reference and change them through a mutable one, trigger the borrow checker's E0502 on purpose and fix it, slice the first name out of a full name, and add the lifetime that error E0106 asks for.Not started
- Project4 h · 7 stepsProject: a kirana bill calculatorWrite a command-line bill calculator for Shree Ganesh Kirana Stores. It prints each item line, the subtotal, CGST and SGST (example GST rates), and the grand total; asks for the customer's name and the cash paid; and prints the change. Money is kept in whole paise, the bill is built in one String passed by &mut, and the finished tool is a fast release build.Not started
Expert
- Project7 h · 7 stepsProject: parallel UPI settlement with full testsA payment aggregator settles each merchant's UPI collections at the end of the day. You write a library crate that parses transaction lines, adds up successful payments per merchant on several threads (a channel collects the partial totals) and counts outcomes in an Arc<Mutex<Stats>>. Then you prove it with unit tests (including should_panic), an integration test, doc tests, cargo clippy -D warnings and cargo fmt --check.Not started
- Capstone14 h · 12 stepsCapstone: a GST invoice tool with a CLI and a web APIBuild gst_invoice, a portfolio-ready Rust tool for small businesses. It reads an invoice saved as JSON, checks the GSTINs and GST rates, works out the taxable value, CGST and SGST (same state) or IGST (another state) to the paisa, and prints a summary as text or JSON. The same library powers a small axum web API. It is covered by unit, integration and doc tests, clean under clippy and rustfmt, and shipped as a release build with a README.Not started
- Project exam2 h · 9 tasksProject exam: Rust in practiceA timed, hands-on exam over the whole course. In two hours you write nine small Rust programs in one cargo project: variables and constants, input with slab logic, fixing borrow-checker errors, structs and enums, Result with a custom error, a HashMap tally, threads with a channel, unit tests, and a clean clippy and rustfmt run. For each task you paste the output of a command; no hints or answers are shown until you hand it in.Not taken