Created
January 31, 2015 01:40
-
-
Save thiagopnts/24dab75574d2a98e5373 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![crate_type = "lib"] | |
#[no_mangle] | |
pub extern fn print_hello() { | |
println!("hello"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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