In this video, we discus how Rust treats it's Test system and how writing a test suite does not increase our run-time overhead due to conditional compilation. We also look at the various different assertion macros that exist in the standard library of Rust to aid us in creating fairly robust and powerful tests without us having to bring in external tools and libraries. We look at the metadata structures known as Attributes and how we can use them to do various different things in the Rust programming language. Though we've used some attributes before this video, we now formally talk about what these little pieces of metadata can do in the larger scheme of things. We also look at the Configuration Attribute specifically and how we can use it to conditionally compile certain parts of code based on various different configurations. We can use the CFG attribute to make multiple functions with the same name that will only compile on specific operating systems without increasing the runtime of our application.
This is our final video in the Introduction to Rust series. The next Rust videos will be projects that make use of the concepts that we've already looked at as well as some of the more advanced concepts that we have yet to talk about. We will be building everything from block-chains to command line tools and multi-threaded servers in the next videos so stay tuned and make sure to keep an eye out.
If you enjoy the video, feel free to follow me on Steemit or on YouTube to get updates on the channel as well as more content.
If you like what I do, tips and upvotes are welcome:
ETH: 0xE448a8DDA5886C49d35B191B2F20630c103024c8
LTC: LXsKxF5JhmMtKgqfcUFdvcXVwiaSqxN9cP
Also, feel free to check out my channel for videos on Go, Elixir and Elm