1 2 3 4 5 6
#![crate_type = "dylib"] extern crate both; use std::mem; pub fn addr() -> usize { unsafe { mem::transmute(&both::foo) } }