You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Possible values for CLI arguments --target-os and --target-arch are undocumented. Currently when you run cargo audit --help you only get this information:
Options:
--target-arch <TARGET_ARCH> filter vulnerabilities by CPU (default: no filter)
--target-os <TARGET_OS> filter vulnerabilities by OS (default: no filter)
and audit.toml.example has this information:
# Target Configuration
[target]
arch = "x86_64" # Ignore advisories for CPU architectures other than this one
os = "linux" # Ignore advisories for operating systems other than this one
But nowhere are listed all possible options. To get this list, I had to dig through source code to find crate platforms and there find enums Arch and OS.
Also documentation of module platforms::target is unhelpful, because it states:
Target cfg attributes. Documented in the “Conditional compilation” section of the Rust reference:
I agree the list needs to be documented better for cargo audit.
As far as the platforms crate is concerned:
The documentation frontpage states the source for this info, but that's not the whole story because we combine the documentation page with the data from the latest nightly rustc, namely rustc --print=cfg --target x86_64-unknown-linux-gnu to get the conditional compilation values. That is where the Arch, OS etc. enum values come from.
platforms crate exists to make this info available even when there is no Rust compiler installed.
The list evolves over time, and targets are added and removed as they are added and removed from the compiler itself. Therefore I don't think simply documenting an exhaustive list will be feasible.
Possible values for CLI arguments
--target-os
and--target-arch
are undocumented. Currently when you runcargo audit --help
you only get this information:and
audit.toml.example
has this information:But nowhere are listed all possible options. To get this list, I had to dig through source code to find crate platforms and there find enums Arch and OS.
Also documentation of module platforms::target is unhelpful, because it states:
And linked page on conditional compilation in The Rust Reference provides only "example" target os and arch values.
Please consider either adding ability to list supported os and arch targes, or provide a link to exhaustive list of them.
The text was updated successfully, but these errors were encountered: