Amanieu / intrusive-rs

Intrusive collections for Rust
Apache License 2.0
412 stars 48 forks source link

Make `Link` and `AtomicLink` `#[repr(C)]` to allow usage in FFI #75

Open benpye opened 2 years ago

benpye commented 2 years ago

As in the title, but would it be reasonable to make Link and AtomicLink #[repr(C)]? I realise that an external library could put the links into a bad state, but this would mean that a list, for example, could be constructed in Rust and then passed to a consumer in C. My use case is actually to pass between two Rust binaries in the same address space.