3 ms·
> Binary libraries are fully supported in Rust, via the C ABI. You can provide a higher-level interface via a wrapper crate. I've never seen this in the wild a
by paavohtl 5y ago
> Binary libraries are fully supported in Rust, via the C ABI. You can provide a higher-level interface via a wrapper crate.
I've never seen this in the wild and to be honest, it seems massively inconvenient to write a library, create a C-compatible interface for it (meaning you lose out on most benefits of Rust's type system), and then write a wrapper for said C-like API to regain type/memory safety and abstraction power. The killer is that you lose the ability to use traits in the interface between, which idiomatic Rust heavily relies upon.