2019-08-30 12:33:40 +00:00
|
|
|
#[link(name="winbridge", kind="static")]
|
|
|
|
extern {
|
|
|
|
// this is rustified prototype of the function from our C library
|
|
|
|
fn testcall(v: f32);
|
2019-08-30 07:58:54 +00:00
|
|
|
}
|
2019-08-30 12:33:40 +00:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
println!("Hello, world from Rust!");
|
|
|
|
|
|
|
|
// calling the function from foo library
|
|
|
|
unsafe {
|
|
|
|
testcall(3.14159);
|
|
|
|
};
|
|
|
|
}
|