pub fn run_main<F: FnOnce() + Send + 'static>(main: F)Expand description
Run main, a compiled program’s Main, on a stack of MAIN_STACK_BYTES.
A failure no boundary catches ends the process in the program’s failure hook, so nothing unwinds out of main.
Generic, so Main is compiled into the call that switches to its stack, as it was into a thread’s start.