It works the same way as many languages, it is supported, with the caveat that the same toolchain is to be used for application and libraries, as to be expected.
There are a few workarounds, the usual provide only a C ABI, with the usual constraints, or make use of libraries that do that while putting a mini ABI for a Rust subset.
Even ecosystems that have more stable ABIs like Swift, or the bytecode based ones, it isn't 100% works all the time, there are some caveats when mixing language versions.
Rust is actually working on an extern "crabi" feature to interop much better with languages like swift AFAIK. E.g. so you can define Vec<i32> as a param in a dll.
It works the same way as many languages, it is supported, with the caveat that the same toolchain is to be used for application and libraries, as to be expected.
Atleast officially, rust famously doesn't guarantee ABI stability even between two cargo runs.
View all comments
Show parent comment
6
u/[deleted] Oct 25 '24
really? I always thought that dynamic linking is not a goal at all, as rust had no intention of stabilizing ABI.