Skip to content

Commit

Permalink
std_detect: Update platform support docs (rust-lang#1380)
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e authored Feb 11, 2023
1 parent 7fbf697 commit 5b169ef
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions crates/std_detect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,25 @@ crate from working on applications in which `std` is not available.
the operating system. `std_detect` assumes that the binary is an user-space
application. If you need raw support for querying `cpuid`, consider using the
[`cupid`](https://crates.io/crates/cupid) crate.
* Linux:
* `arm{32, 64}`, `mips{32,64}{,el}`, `powerpc{32,64}{,le}`: `std_detect`

* Linux/Android:
* `arm{32, 64}`, `mips{32,64}{,el}`, `powerpc{32,64}{,le}`, `riscv{32,64}`: `std_detect`
supports these on Linux by querying ELF auxiliary vectors (using `getauxval`
when available), and if that fails, by querying `/proc/cpuinfo`.
when available), and if that fails, by querying `/proc/cpuinfo`.
* `arm64`: partial support for doing run-time feature detection by directly
querying `mrs` is implemented for Linux >= 4.11, but not enabled by default.

* FreeBSD:
* `arm32`, `powerpc64`: `std_detect` supports these on FreeBSD by querying ELF
auxiliary vectors using `sysctl`.
* `arm64`: run-time feature detection is implemented by directly querying `mrs`.

* OpenBSD:
* `arm64`: run-time feature detection is implemented by querying `sysctl`.

* Windows:
* `arm64`: run-time feature detection is implemented by querying `IsProcessorFeaturePresent`.

# License

This project is licensed under either of
Expand Down

0 comments on commit 5b169ef

Please # to comment.