Check out example codes for "rustlang how to compile". It will help you in understanding the concepts better.

Code Example 1

in the shell, in your largest relevant directory, type:
cargo build

Learn ReactJs, React Native from akashmittal.com