Symbol aliases

The link_name attribute sets the name of an imported symbol and has no effect for exported symbols (that I know of).

That sounds a lot like defining a static which I believe should work? Maybe it needs a #[used] annotation although it shouldn't.

#[no_mangle]
pub static alias_of_sum: extern "C" fn(a: i32, b: i32) -> i32 = sum;
1 Like