6
的cargo
命令行工具允许我为我的箱子生成文档,但是我有这样的结构:如何为所有平台生成货物文档?
#[cfg(target-platform("windows")]
mod winstuff {
/// Explanation of Windows-specific tasks
}
#[cfg(target-platfrom("linux")]
mod linstuff {
/// Explanation of Linux-specific tasks
}
当我运行cargo docs --no-deps
,只有特定于平台的模块,用于获取生成我生成文档。我如何生成所有平台的文档?
我不认为有一个简单的解决方案,官方的Rust文档[甚至没有记录'std :: os :: windows'模块](https://github.com/rust-lang/rust/issues/24658),因为这个问题。 GitHub上的线程暗示'docs.rs'有一个解决方案,但我找不到细节。 – Aurora0001
对于每个箱子的文档,docs.rs在右上角有一个平台选择器。 – bluss
'doc.rs'使用构建脚本为每个平台手动生成文档。根据[货物追踪器](https://github.com/rust-lang/rust/issues/1998)。没有修复。 – Valarauca