Rust Building Projects at Schools of Industrial Education
The world of Rust programming through a series of projects at esteemed educational institutions. Learn about Rust concepts, manifests, annoying habits, and more to enhance your coding skills. Discover the journey of Iolanthe II in the Auckland-Tauranga Race and delve into the fundamentals of building with Rust.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
RUST Building projects John Morris School of Industrial Education and Technology, KMITL previously Engineering, Mahasarakham University Electrical and Computer Engineering, The University of Auckland Iolanthe II leaves the Hauraki Gulf under full sail Auckland-Tauranga Race, 2007
Programming Languages MAKING THINGS RUN
Rust concepts Crates Rust stores libraries of existing functions in Manifest Crates needed for a program are defined in the manifest Cargo.toml Text file [package] name = "pi version = "0.1.0 edition = "2021 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] rand = "0.8.5"
Manifest Various information about your program, versions, authors, etc Basic manifest automatically generated by cargo build pi Found in project directory, pi cd pi
Manifest Edit Cargo.toml with any text editor, e.g. Notepad Add additional crates to the [dependencies] section <name of crate>= <version number> eg rand = 0.8.5 Find the most recent version from https://crates.io/crates Search by name of crate, e.g.rand Find the most recent version number, e.g.0.8.5 Add the crate name + version number to manifest [package] name = "pi version = "0.1.0 edition = "2021 # See more keys and their definitions at . [dependencies] rand = "0.8.5 cd Save!
Rust concepts In your project directory cargo build After (possibly a long delay) cargo will update its crates Now you can run your program cargo run Optionally Executable pi.exe will be found in the target directory
Rust manifests Executable pi.exe Can now be copied anywhere It will run independently i.e. not need the Rust system
Rust - Annoying Habits cargo tries to remember what you previously compiled Even if you have updated the default main.rs Containing the Hello world program!! In this case, clean its memory cargo clean p pi Build and run again cargo build cargo run