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

Add the *.lib file to the wheel built by maturin on Windows (with the cffi bindings) #2289

Open
brycebjork opened this issue Nov 4, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@brycebjork
Copy link

brycebjork commented Nov 4, 2024

I've found maturin to be a very useful way to package and distribute cross-platform dynamic libraries (using cffi bindings). The dynamic libraries can then be used from python or executables can be built and linked against them. The second flow works well on linux and mac, but Windows fails due to the lacking *.lib file containing the required symbols.

On Windows, the *.lib file is generated along with the *.dll file and is very small. I propose that the *.lib file should be bundled into the wheel built by maturin along with the *.dll to enable other programs to be linked against the dll.

@brycebjork brycebjork added the enhancement New feature or request label Nov 4, 2024
@messense
Copy link
Member

messense commented Nov 5, 2024

Do you have a reproducible example? Windows .lib files are usually static libraries or import libraries which are only used in compliation not in runtime, so I'm not sure what the exact issue you were having and how/why bundling .lib files will help fix it.

Edit:

The dynamic libraries can then be used from python or executables can be built and linked against them.

so you want to distribute the wheel for others to link to the dylibs in it? I guess it's a valid feature request but I don't think it should be on-by-default.

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

No branches or pull requests

2 participants