Skip to content

Stop exporting amain for android. #10875

Description

@ILyoan

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.
    }
}

Thus I don't think we need amain hack any longer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-androidOperating system: Android

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions