Skip to content

Instantly share code, notes, and snippets.

@thiagopnts
Created January 31, 2015 01:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thiagopnts/24dab75574d2a98e5373 to your computer and use it in GitHub Desktop.
Save thiagopnts/24dab75574d2a98e5373 to your computer and use it in GitHub Desktop.
#![crate_type = "lib"]
#[no_mangle]
pub extern fn print_hello() {
println!("hello");
}
#include <stdio.h>
extern void print_hello(void);
int main(int argc, char **argv)
{
print_hello();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment