diplomat 0.5.0

The diplomat FFI generation macro
Documentation
---
source: macro/src/lib.rs
expression: "rustfmt_code(&gen_bridge(parse_quote! {\n                            mod ffi\n                            {\n                                struct Foo {} impl Foo\n                                {\n                                    #[cfg(feature = \"foo\")] pub fn bar(s : u8)\n                                    { unimplemented! () }\n                                }\n                            }\n                        }).to_token_stream().to_string())"
---
mod ffi {
    #[repr(C)]
    struct Foo {}
    impl Foo {
        #[cfg(feature = "foo")]
        pub fn bar(s: u8) {
            unimplemented!()
        }
    }
    #[no_mangle]
    #[cfg(feature = "foo")]
    extern "C" fn Foo_bar(s: u8) {
        Foo::bar(s)
    }
    #[no_mangle]
    extern "C" fn Foo_destroy(this: Box<Foo>) {}
}