title: How do I convert a C string into a Rust string and back via FFI?
body: <p>I'm trying to get a C string returned by a C library and convert it to a Rust string via FFI.</p>
  
  <p><strong>mylib.c</strong></p>
  
  <pre><code>const char* hello(){
      return "Hello World!";
  }
  </code></pre>
  
  <p><strong>main.rs</strong></p>
  
  <pre class="lang-rust prettyprint-override"><code>#![feature(link_args)]
  
  extern crate libc;
  use libc::c_char;
  
  #[link_args = "-L . -I . -lmylib"]
  extern {
      fn hello() -&gt; *c_char;
  }
  
  fn main() {
      //how do I get a str representation of hello() here?
  }
  </code></pre>