>>4Try adding
#[no_mangle]
immidiately before the function.
0.15 Can C code call Rust code?
Yes. The Rust code has to be exposed via an extern declaration, which makes it C-ABI compatible. Such a function can be passed to C code as a function pointer or, if given the #[no_mangle] attribute to disable symbol mangling, can be called directly from C code.
—
http://doc.rust-lang.org/complement-lang-faq.html#can-c-code-call-rust-code?no_mangle - on any item, do not apply the standard name mangling. Set the symbol for this item to its identifier.
—
http://doc.rust-lang.org/rust.html#miscellaneous-attributesWhat's this about unrolling loops?