title: How to run compiled Rust code inside Rust
body: <p>I want to run a Rust compiled into Rust:</p>
  <pre class="lang-rust prettyprint-override"><code>// Not real code
  fn main() {
      Process::new(code!(&quot;
          fn main() {
              println!(\&quot;hi\&quot;);
              // Doesn't show in console
          }
      &quot;));
  }
  </code></pre>
  <p>I need that process to be totally outside program, because the program needs to auto modify, I don't wanna a thread.</p>
  <p>I cannot do an constant or something, because that code should be compiled at compile time with platform specified compiled.</p>
  <p>And no, I dont wanna a separate file, I want it all on a .exe.</p>