Rust Notes

What's the difference between C/C++ and Rust?

Can I use C/C++ libraries in Rust?

References and variables

Mutable and immutable.

Macros

Use ! to declare them.

Shadows

We can shadow a variable to other types.

Scopes and traits

We can bring types to our scope. If we want to call a method, we should obey to a trait and make it sure that we have all the required types on our scope.

Errors

This is how you generally move from ‘crash on error’ to ‘actually handle the error’, by switching from ok().expect() to a match statement.

Installing

curl -sf -L https://static.rust-lang.org/rustup.sh | sh