Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic library reloading #16

Open
lynaghk opened this issue Dec 17, 2024 · 1 comment
Open

Dynamic library reloading #16

lynaghk opened this issue Dec 17, 2024 · 1 comment

Comments

@lynaghk
Copy link

lynaghk commented Dec 17, 2024

This library is really cool, thanks for making it!

I'm exploring using it to interop from my Clojure REPL with a dynamic library I'm creating in Swift on MacOS.

I'd love to be able to add new functions to the native side and start using them immediately without having to fully restart my JVM + REPL.
Do you think this would be possible and worthwhile to add to coffi?

This Rust issue conversation suggests that there are a few hoops to jump through on Mac but it's ultimately possible.

I'm happy to put some effort into this, but I know very little about this kind of native stuff so figure I'd get your take before I started shaving this yak =D

@IGJoshua
Copy link
Owner

This is something I'm definitely interested in exploring. I'll try to play around and see what kinds of limitations I run into while working on it. I expect to potentially run into a bunch of hurdles around needing to redefine wrapped functions etc. when the new library is loaded, and since coffi doesn't keep track of which symbols come from which libraries it will be nontrivial without code changes to support automatically reloading the definitions when a library is reloaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants