Is it good practice to specify just one target for docs.rs?

⚓ Rust    📅 2026-04-02    👤 surdeus    👁️ 6      

surdeus

Most crates are not dependent on the target, by including something like this in your cargo.toml file

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

docs.rs will only generate documentation for a single target.

It seems like if everyone did this, the docs.rs build queue might be shorter, and less electricity would be consumed!

Is this good practice? I think it should be.

2 posts - 2 participants

Read full topic

🏷️ Rust_feed