swift-bridge icon indicating copy to clipboard operation
swift-bridge copied to clipboard

Memory safe support for `#[swift_bridge(Copy(0))]` on zero sized types

Open chinedufn opened this issue 3 years ago • 0 comments

We want to be able to support:

#[swift_bridge::bridge]
mod ffi {
    extern "Rust"{
        #[swift_bridge(Copy(0))]
        type Zst;
    }
}
struct Zst;

Not sure what happens right now.. But it's probably incorrect.. Need to investigate..


Somewhat related to https://github.com/chinedufn/swift-bridge/issues/14

chinedufn avatar Apr 28 '22 21:04 chinedufn