Removing panic unwind without using no_std

Hi, I want to remove the unwinding part of the rust runtime.

I have set panic = "abort" while also using -Z build-std-features=panic_immediate_abort

Based on my research, the unwind code exists so that it drops all needed structs to cleanup. However, I'm fine without it.

However, on windows, the runtime registers a vectored exception handler. I can't have that. How do I remove the rust unwinder?

Which Windows version are we talking about?

I'm only aware of a single vectored exception handler being installed. The one for invalid memory accesses. This one is used to show a nice message in case of a stack overflow. The only options to not have it get registered are either modifying the standard library source or bypassing libstd's main wrapper using something like:

#![no_main]

use std::ffi::{c_char, c_int};

#[no_mangle]
extern "C" fn main(_argc: c_int, _argv: *mut *mut c_char) -> c_int {
    my_main();
    0
}

Which unwind code exactly? There shouldn't be any for your own code with panic=abort and also none for the standard library if you use -Zbuild-std (even without -Zbuild-std-features=panic_immediate_abort).