roualdes / bridgestan

BridgeStan provides efficient in-memory access through Python, Julia, and R to the methods of a Stan model.
https://roualdes.github.io/bridgestan
BSD 3-Clause "New" or "Revised" License
88 stars 12 forks source link

fix(rust): Allow loading more recent libraries #153

Closed aseyboldt closed 1 year ago

aseyboldt commented 1 year ago

I think it should be legal to provide a bridgestan library that was compiled with a later version of bridgestan, if the major version still matches. But the rust wrapper expects an exact version match right now. This means that downstream rust libraries have to specify an exact version of the python bridgestan library, or a user could update the python library and libraries built by that new bridgestan couldn't be loaded anymore.

Supporting older libraries would be some work, as we would have to handle the case that symbols might be missing in the library, so we still don't allow that.

This change would also imply that the ABI can't change without a major version bump. I can't really think of reasons why that would be a problem though...

WardBrian commented 1 year ago

This change would also imply that the ABI can't change without a major version bump.

We only really guarantee a stable API, but ABI compatibility should be inherited from whatever C compiler is used. This sounds good to me