-
Notifications
You must be signed in to change notification settings - Fork 192
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
Nimble package with external shared library #918
Comments
Yeah, this is a tricky one. I think we need a proper API for this stuff. Ideally users should be able to ask Nimble to put built shared libraries somewhere where the system can find them, this usually needs |
That would be a start, and IMO asking the user to source an But using environment variable might not even be enough to cover all use case. Consider the following :
What happens if you install both NimblaA v1.0.0 and NimbleA v2.0.0, which library is actually the one used ? What if some projects depends on NimbleA v1.0.0 and some projects depends on NimbleA v2.0.0, how do we handle that ? Then again, maybe it's better to start small and not over complicate things |
Yeah, I dunno. I would be tempted to consider this out of scope for Nimble. Dynamic libraries should be handled by the OS package manager. |
Os package manager are not enough. Lots of library don't have official release from OS package manager and needs to be downloaded and uncompressed / rebuild from source. I think this is very much in Nimble scope since easy FFI is one of Nim's key selling point. Saying that the official package manager do not support the distribution of shared library bindings would be disappointing since lots of stuff is built relying on shared C or C++ library |
Use the following pragmas: {.passCflags: staticExec("pkg-config --cflags mydep").}
{.passLflags: staticExec("pkg-config --libs mydep").} |
Some package rely on an external shared library (https://github.com/SciNim/flambeau for example).
To make things easier, the download, extract eventually build of the library is wrapped by a Nimble task in a vendor folder (that is not in git configuration).
Where should these external library be installed in nimble to be used easily with package ?
Should a
libs
folder insidenimbleFolder
be added (in the same way asbin
? Should we put libraries as binary insidebin
?The text was updated successfully, but these errors were encountered: