title: Why does Rust not have a return value in the main function, and how to return a value anyway?
body: <p>In Rust the main function is defined like this:</p>
  
  <pre><code>fn main() {
  
  }
  </code></pre>
  
  <p>This function does not allow for a return value though. Why would a language not allow for a return value and is there a way to return something anyway? Would I be able to safely use the C <code>exit(int)</code> function, or will this cause leaks and whatnot? </p>