context 2.0.1

Cooperative multitasking for Rust using Boost.Context
Documentation

#[link(name = "test", kind = "static")]
extern "C" {
    fn just_call(f: extern "C" fn());
}

extern "C" fn will_panic() {
    struct Foo;

    impl Drop for Foo {
        fn drop(&mut self) {
            println!("Inside! I am dropping");
        }
    }

    let _foo = Foo;

    panic!("Oh fuck!");
}

fn main() {
    unsafe { just_call(will_panic); }
}