Skip to content

Bad exit code #36

@bhansconnect

Description

@bhansconnect

Currently, we aren't correctly setting the exit code and it can be random.

In lib.rs, we have pub extern "C" fn rust_main(). It does not return an exit code.
Then in host.c we have int main() { return (int)rust_main(); }. We take the void return value and cast it to an int.

we should either change that to:

int main() {
    rust_main();
    return 0;
}

Or we should change rust_main to return an int.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions