On 07/13/2016 02:24 AM, Dridi Boukelmoune wrote:
Since 1.10 (the target of this change) it has become possible to
create "cdylib" (C dynamic library) crates, basically shared objects
that can be linked to by non-Rust programs.
It isn't supported by cargo yet, but it's available..
Yes, you can use this to provide a library of extern-C functions. I see
no problem Rust-based packages using this in Fedora, but they will need
to adhere to the usual stability policies.
Actually, I think you could do that even with the "dylib" target. It's
just that this would include all the metadata and symbols for its
reachable Rust items too, which is irrelevant for an FFI library.
There's more info in the RFC: