Is there a way of returning an exit code in Rust 1.0?
I've tried env::set_exit_status(exit_code);
but this generates a compiler error.
There is also this question: Exit Rust program early which is similar but asks about the case when the process has to be exited early.
EDIT: I'm looking for a solution that will also allow the process to tidy up the stack, call destructors, etc.