rust a memory safe compiled programming language that delivers high-level simplicity with low-level performance it's a popular choice for building systems where performance is absolutely critical like game engines databases or operating systems and is an excellent choice when targeting webassembly it started as a side project of great on in NUMBER_TOKEN who named it after the rust fungus it was sponsored by mozilla in NUMBER_TOKEN and has been ranked the most loved programming language every year since NUMBER_TOKEN with its fans being known as rust stations traditionally high level languages provide a garbage collector to nerf your control over memory management while lower level languages provide functions like free and allocate to shoot yourself in the foot rust takes a different approach it has no garbage collector but achieves memory safety with a concept known as ownership and borrowing by default every variable in rust is immutable this allows values to be used in the stack memory which has minimal performance overhead however mutable values or objects with an unknown size at compile time are stored in the heap memory every value in a rust program is assigned to a single variable known as its owner when that variable goes out of scope the memory allocated to it is dropped automatically in some cases though you may want to pass a reference to a different part of the program borrowing allows you to access a reference in memory without taking ownership of it there are a ton of rules to go along with this system that the rus borrow checker will validate at compile time these rules keep your code safe while providing absolute control over performance rust also has a package manager called cargo where each individual package is a crate to get started install rest then run cargo new from the command line in the URL_TOKEN file you'll find a main function which is where the program will start executing declare a variable with let followed by its name and type the value can't be changed or reassigned by default so add mutt to make it mutable the name of the variable is the owner a reference to its location in memory can be borrowed by other parts of the program by prefixing it with an ampersand then use a macro like print line to log the value to the standard output rest also comes with a standard library that contains modules to handle io the file system concurrency among many other things now compile your code to an executable with the rust compiler you just built a memory safe executable that can handle the most performance intensive system requirements this has been rust in NUMBER_TOKEN seconds hit the like button and subscribe if you want to see more short videos like this and leave a comment if you want to see a full rust tutorial thanks for watching and i will see you in the next one
START_INTERACTION_TOKEN hit the like button and subscribe if you want to see more short videos like this and leave a comment if you want to see a full rust tutorial thanks for watching and i will see you in the next one END_INTERACTION_TOKEN