Hacker News new | ask | show | jobs
by zozbot234 1439 days ago
Rust has a stable ABI actually, it's called the C ABI. But since most Rust crates do rely on monomorphized generic code in many ways, it's just not possible to share binary artifacts in the first place. (The situation is similar for "header only" libraries in C++.) If you're writing a library that truly does not involve generic code, it makes total sense to expose it via a pure C interface anyway so that languages other than Rust can make use of it.
1 comments

C ABI is very well supported indeed. After commiting some contortions to avoid varargs, I found out Rust does actually cover them.

But it's still something different than a real rust ABI. Basic things like pushing a string or an enum to a client will hurt. Providing a rust library without source is not an option for now.