Open
Description
Currently a library named foo
will generate an artifact libfoo.dylib
on OSX. That's probably the right default, but it's doubly problematic when building CPython libraries (native modules):
- CPython's
import
statement will lookup the shared library's name exactly (ignoring extension) requiring animport libfoo
. Thelib
prefix is very rarely used in Python (the lib suffix somewhat more so,libfoo
might also be the postfix to a Python binding tolibfoo
e.g.python-libfoo
). This is compounded by "accelerator" native modules (as replacements or improvements of pure-python ones) normally being prefixed by_
: Cargo would generatelib_foo
rather than the expecting_foo
- CPython doesn't look for
.dylib
files, it apparently only looks for.so
files, even in OSX
Being able to provide an exact name for generated library artifacts (maybe platform-wise?) would fix both issues.
I didn't find any way to achieve that via a build script, or the native parameters of cargo build
.
Metadata
Metadata
Assignees
Labels
Area: build.rs scriptsArea: selection and definition of targets (lib, bins, examples, tests, benches)Area: Cargo.toml issuesCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.