Is it correct to use cdylib not in the context of ffi

According to this, dylib only burdens static dependencies and it is unstable. The question is, should I write dynamic libraries as if they should be called from the C language? even if the project does not use ffi,

how exactly is your library get used? please elaborate more about the problem. typically dylib might not be what you want, but I don't think it is "unstable" either, at least in the sense that it requires unstable compiler features. but if you mean it doesn't have stable ABI, then it's true.

if the intended use case is as some form of runtime loadable module/extension/plugin, then you should use "cdylib" anyway. even if your host application is written in rust, you still might get trouble when loading mangled rust symbols. but a new mangling scheme should (hopefully) come soon. see rfc2603 for details.

Thank you for explanation, this answer fits my case

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.