Skip to content

Stop exporting amain for android. #10875

Closed
@ILyoan

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.

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