-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
A-crate-typesArea: crate-type declaration (lib, staticlib, dylib, cdylib, etc.)Area: crate-type declaration (lib, staticlib, dylib, cdylib, etc.)C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Description
Cargo currently enforces only one library crate per package which makes total sense for Rust libraries. However it doesn't make much sense for cdylib
s or staticlib
s which are not going to be consumed by downstream Rust dependencies. Requiring that only the library crate can be a cdylib
or staticlib
, and not binary crates, sometimes forces people into mixing lib
and cdylib
or staticlib
and Rust currently produces suboptimal results when doing so. It also means people cannot produce multiple cdylib
s or staticlib
s from a single package.
I'd like to propose extending [[bin]]
to allowcdylib
and staticlib
for the crate-type
.
Shoeboxam, krolli, joshtriplett, stanislav-tkach, tobywf and 16 moreEvrey, guilhermewerner, jmjoy and EriKWDev
Metadata
Metadata
Assignees
Labels
A-crate-typesArea: crate-type declaration (lib, staticlib, dylib, cdylib, etc.)Area: crate-type declaration (lib, staticlib, dylib, cdylib, etc.)C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.