Skip to content

Turn bin/lib into subcrates within workspace? #1970

Closed
@Kixunil

Description

@Kixunil

Bindgen is both library and binary but binary requires certain features which are not needed in build scripts (mainly clap). This is handled by features but because of the way features work in Cargo they are turned on by default. This is a footgun for every library author who wishes to use build script as they may forget to turn them on. An example of this case was found in rocksb.

Spliting up library and binary fixes the issue without causing ridiculous compile errors because of missing features.
Alternative: wait eternity until rust-lang/rfcs#3020 is implemented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions