<aside> π‘ if you have edits or comments please reach out to me at @andrewhong5297 on Twitter
</aside>
βββββββββββββββββββββββββββββββ
make sure to get both the official rust and rust-analyzer vs code extensions
cargo build
or cargo build --release
for optimized. compile and run with cargo run
in project folder.cargo doc --open
this will open a page with all the functions in your dependencies. (this is really useful to understanding the functions, like python help(f)
match
pattern seems very useful, especially when paired with enums
.&
in here. *
means removing a reference.#[ ]
things that look like decorators. This still doesn't really make much sense to me!
signifies a macro, like println!
or vec!
. https://doc.rust-lang.org/stable/book/ch19-06-macros.html and this is a good video explainer https://www.youtube.com/watch?v=VGk95NXaafsimpl
, these implementations can inherit from each other as well. see dropdown example:crate::prelude::struct
), various libraries in the Rust ecosystem may also define their own preludes. The difference between 'the prelude' and these other preludes is that they are not automatically use 'd
, and must be imported manually. This is still easier than importing all of their constituent components.