Open nodakai opened 8 years ago
Thanks for the report. I do think this is intentional since we are producing libc's for every supported platform. cc @alexcrichton
Yeah this is currently intentional, the idea is that you can go from there to look at the documentation for any architecture.
Albeit it could be styled much better
Understood it was intentional but can we achieve it natively with rustdoc
?
We already have src/windows.rs
and src/unix/lib.rs
... Can we just parallelly expose them to rustdoc
? To differentiate different flavors of Unix, how do you like:
## unix/lib.rs
cfg_if! {
if #[(all(target_os = "linux", target_arch = "x86_64")] {
mod linux_x86_64;
pub use linux_x86_64::*;
} else if #[(all(target_os = "android", target_arch = "arm")] {
mod android_arm;
pub use anrdoid_arm::*;
}
}
pub mod linux_x86_64 {
}
While that may work for Unix/Windows that doesn't necessarily work for FreeBSD/Linux (for example) due to the way the source is structured.
https://doc.rust-lang.org/std/ -> click "libc" on the left column -> https://doc.rust-lang.org/libc/index.html which looks like a directory listing