You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rustc exports amain when build library for android to provide an start point that initiate rust runtime.
Now we have start_on_main_thread exported publicaly, a rust library is able to provide an entry function without amain hack .
#[no_mangle]
pub extern fn entry(argc: int, argv: **u8) -> int {
do std::rt::start_on_main_thread(argc, argv) {
// do what you want.
}
}
Activity
ILyoan commentedon Dec 9, 2013
Related to #4404
alexcrichton commentedon Dec 10, 2013
Does this also mean that we could remove the logic of sometimes naming the entry point
mainand sometimesamain?ILyoan commentedon Dec 11, 2013
@alexcrichton Yes.
I don't think android libraries need an entry point to start runtime at all. we can remove all related code tagged as "FIXME #4404"
Auto merge of rust-lang#10876 - flip1995:gh-pages-cleanup-repo, r=fli…
Merge rust-lang#10875