Created
August 15, 2016 23:24
-
-
Save retep998/372e2e67f8a55a93a3e0f4d1a75ed1f6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//Compiled as a static library bar.lib | |
int bunny = 273; | |
int rabbit() { return 273; } |
This file contains hidden or 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
//Compiled as both a dylib and an rlib so there is both foo.rlib and foo.dll | |
#[link(name = "bar", kind = "static")] | |
extern { pub static bunny: i32; } |
This file contains hidden or 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
//Compiled as a Rust executable meow.exe | |
extern crate foo; | |
fn main() { | |
println!("{:?}", foo::bunny); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment