microseh 1.1.1

Structured Exception Handling (SEH) for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[cfg(all(windows, not(docsrs)))]
extern crate cc;

#[cfg(all(windows, not(docsrs)))]
fn main() {
    // TODO: this is a hack to allow this crate to build on docs.rs.
    //       https://github.com/sonodima/microseh/pull/11#issuecomment-2385633164
    if !std::env::var("HOST").unwrap_or_default().contains("gnu") {
        cc::Build::new().file("src/stub.c").compile("sehstub");
    }
}

#[cfg(any(not(windows), docsrs))]
fn main() {
    println!("cargo:warning=building for a non-supported platform, exception handling will not be available");
}