Skip to content

rustdoc disregards job limit #53143

Open
Open
@ilammy

Description

@ilammy

When running doctests (via cargo doc or cargo test) rustdoc will compile each doctest separately, keeping a queue of compilation jobs. Maximum size of the queue seems to be limited to the number of CPUs in the system, but there seems to be no way to adjust that via command line or other configuration (--jobs N is ignored, for example).

This is particularly nasty on my laptop with 8 CPUs and only 8 GB of RAM that are quickly consumed by eight linkers running in parallel with all other stuff. Lying to rustdoc about CPU count by hooking sysconf() helps as a workaround, but this is hardly an elegant solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-doctestsArea: Documentation tests, run by rustdocA-libtestArea: `#[test]` / the `test` libraryT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions