Consider using "lib" prefix for Cygwin cdylib?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Currently, despite considered a Unix, Cygwin inherits Windows' lack of lib prefix for cdylibs:
$ echo | rustc --crate-type cdylib - # using rustc for simplicity, but cargo projects behave the same
$ ls
librust_out.dll.a rust_out.dll
Whereas all other Unix targets produce lib + name + .so / .dylib. This makes porting applications more hassle than it needs to be IMO.
I think Windows GNU targets should also behave the same, but I imagine that is going to be a lot more breakage, potentially more than it's worth, so I'll limit the request to Cygwin, but opinions welcome.
FWIW, CMake also produces libraries with the lib prefix.
Meta
$ rustc --version --verbose
rustc 1.91.0 (f8297e351 2025-10-28) (Rev4, Built by MSYS2 project)
binary: rustc
commit-hash: f8297e351a40c1439a467bbbb6879088047f50b3
commit-date: 2025-10-28
host: x86_64-pc-cygwin
release: 1.91.0
LLVM version: 21.1.1
(backtrace N/A)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior with the rustc --crate-type cdylib - command on the Cygwin target and compare its generated names with other Unix targets. Locate the target-specific artifact naming logic and relevant tests; done means the Cygwin cdylib and import library use the requested lib prefix without unintentionally changing other targets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100