blob: c57981599ee42e2092588704774f947a6eb80c54 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
extern crate common;
extern crate libothername;
extern "C" {
fn extra_func() -> i32;
}
#[cfg(feature = "foo")]
#[no_mangle]
pub extern "C" fn rust_func() -> i32 {
#[cfg(unix)]
{
extern crate unixdep;
assert!(unixdep::only_on_unix() == 0);
}
assert!(common::common_func() == 0);
assert!(libothername::stuff() == 42);
let v: i32;
unsafe {
v = extra_func();
};
mybar::VALUE + v
}
|