Skip to content

Instantly share code, notes, and snippets.

@SiegeLord
Created April 11, 2013 18:49
Show Gist options
  • Save SiegeLord/5366094 to your computer and use it in GitHub Desktop.
Save SiegeLord/5366094 to your computer and use it in GitHub Desktop.
"Safe" C functions
extern mod crate;
fn main()
{
println(fmt!("%?", crate::rand()));
}
#[crate_type = "lib"];
pub extern "C"
{
fn rand() -> libc::c_int;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment