-
What do you already know about it?
- Low Level Programming Language
- C, C++
- Go
- Compiled code runs natively
- No "runtime"
- Memory "Safe"
- Memory errors are typically caught at compile time
- Borrow checking?
- Other LL languages require manual memory management
- Other LL languages have a "garbage collector"
- Memory errors are typically caught at compile time
- Low Level programming people like it!
- Used for CLI tools and Build tools in the JS ecosystem
- Blazingly fast!
- Low Level Programming Language
-
What is it?
- Low Level Programming Language
- The Rust programming language helps you write faster, more reliable software
- Rust gives the ability to do low level programming (systems programming, native programming, bare metal) in a similar style to high level languages
- Less hassle than traditional Low Level programming languages
-
How to Learn
-
Why would we use it?
- Speed
- Speed of Developer Experience
- Speed of running code
- Stability
- Compiler checked when new features are added to the lang
- From the Rust Book:
- Overall, Rust’s greatest ambition is to eliminate the trade-offs that programmers have accepted for decades by providing safety and productivity, speed and ergonomics.
- Speed
-
How do we get started?
- Cargo
- Dependency Manager
- Build Tool
- Rustfmt
- Built in formatter
- Sensible defaults every Rust developer uses
- Rust Language Server
- IDE integration / error messages
- Install:
- Use Cargo to generate a project / library
- Cargo
-
Things I like
- cargo run
- Compiler errors are REALLY helpful
- cargo run
-
Hello World
-
Key Concepts
- Ownership
- I think
- Compiler level garbage collection?
- No runtime...
- But the compiler can keep track of where a value is used and free it up automatically
- Kinda like smart pointers?
- Compiler level garbage collection?
- Rules
- Each value in Rust has an owner.
- There can only be one owner at a time.
- When the owner goes out of scope, the value will be dropped.
- I think
- Ownership
-
Build a CLI git repo cloner
- Create a package
- Add a dependency
- Tests
-
Overall impressions
- Docs are amazing
- Crates we needed existed
- Community is nice
- Compiler errors are really good!
- Code wasn't too crazy
- Cargo is full featured!
- Project setup
- Linting / Formatting
2024-01-05
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||