Skip to content

Set a specific feature during doc generation #50

Closed
@dflemstr

Description

@dflemstr

Use case: if your library depends on some native library or otherwise does something funky during build, it won't be exposed on docs.rs.

The build could check for the presence of a docs feature in the Cargo.toml file, for example like this:

cargo read-manifest | rq 'select"$.features"|map(o)=>{_.keys(o)}|spread|some(x)=>{"docs"==x}'

(Shameless plug: rq)

Setting this docs feature would allow the library to "defuse" itself, by not running a build script or not trying to link a native library.

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