Skip to content

Add guidance around sharing cdylibs between Rust crates? #8159

Open
@workingjubilee

Description

@workingjubilee

Publishers are likely to have an expectation that their crate is easy to use :: by other Rust authors. However publishing the cdylib crate type does not publish crates that are ready to be easily used by cargo without considerable more fuss than other crate types.

It is unlikely this is intentional. If people do not understand what they are doing, they should be prevented from doing this in their cargo publish command and offered some kind of option to --override if they do indeed have some sort of legitimate purpose.

This recently became visible in an attempt to use emgyrz/cubic_spline#2 so it is not an idle hypothesis that this is a problem.

I am willing to attempt drafting this feature if it is considered desirable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-crate-typesArea: 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`S-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions