You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The usage of [DllImport("libllama")] results in the windows binaries being prefixed with "lib".
The native libraries in the NuGet packages have renamed DLLs. This makes it annoying to copy in llama binary releases for windows, for testing purposes. If the DLL imports were replaced with just [DllImport("llama")], this issue would not exist on windows, and on other platforms libllama.so and dylibs would work too, even with the lib prefix.
When running on Windows, the DLL is searched for in the following order:
nativedep nativedep.dll (if the library name does not already end with .dll or .exe)
When running on Linux or macOS, the runtime will try prepending lib and appending the canonical shared library extension. On these OSes, library name variations are tried in the following order:
This change would require the NuGet llama native binaries get renamed back to llama.dll for windows.
The reason I chose to bring this up, is I'm annoyed by having to remember to rename the dll. I'm trying to get OpenCL/ROCm working, as I don't have, nor do I want an nvidia GPU.
This results in windows users not needing to rename the DLL. This allows native llama builds to be dropped in, even on windows.
I also took the time to update the documentation, removing references to renaming the files, since the names now match.
FixesSciSharp#463
The usage of
[DllImport("libllama")]
results in the windows binaries being prefixed with "lib".The native libraries in the NuGet packages have renamed DLLs. This makes it annoying to copy in llama binary releases for windows, for testing purposes. If the DLL imports were replaced with just
[DllImport("llama")]
, this issue would not exist on windows, and on other platforms libllama.so and dylibs would work too, even with the lib prefix.From: https://learn.microsoft.com/en-us/dotnet/standard/native-interop/native-library-loading
The text was updated successfully, but these errors were encountered: