Skip to content

Clarify rustc-args vs rustdoc-args in cross-compiling section #2284

Closed

Description

You can configure how your crate is built by adding package metadata to your Cargo.toml, e.g.:

[package.metadata.docs.rs]
rustc-args = ["--cfg", "docsrs"]

https://docs.rs/about/builds#cross-compiling

This may be a little confusing compared to the standard practice of rustdoc-args = ["--cfg", "docsrs"], this section should clarify that this cfg is used for things like the build.rs or dependencies but not for the docs themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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