Check out example codes for "rust lang start a new project". It will help you in understanding the concepts better.

Code Example 1

//Enter in the command line:
--------------------------------------------------
>cargo new <NAME_OF_PROJECT_HERE>

//It will create a new folder with all the basic files. The main.rs file is
//in the src folder

Learn ReactJs, React Native from akashmittal.com