Skip to content

Commit 5b169ef

Browse files
authored
std_detect: Update platform support docs (rust-lang#1380)
1 parent 7fbf697 commit 5b169ef

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

crates/std_detect/README.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,25 @@ crate from working on applications in which `std` is not available.
4646
the operating system. `std_detect` assumes that the binary is an user-space
4747
application. If you need raw support for querying `cpuid`, consider using the
4848
[`cupid`](https://crates.io/crates/cupid) crate.
49-
50-
* Linux:
51-
* `arm{32, 64}`, `mips{32,64}{,el}`, `powerpc{32,64}{,le}`: `std_detect`
49+
50+
* Linux/Android:
51+
* `arm{32, 64}`, `mips{32,64}{,el}`, `powerpc{32,64}{,le}`, `riscv{32,64}`: `std_detect`
5252
supports these on Linux by querying ELF auxiliary vectors (using `getauxval`
53-
when available), and if that fails, by querying `/proc/cpuinfo`.
53+
when available), and if that fails, by querying `/proc/cpuinfo`.
5454
* `arm64`: partial support for doing run-time feature detection by directly
5555
querying `mrs` is implemented for Linux >= 4.11, but not enabled by default.
5656

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

62+
* OpenBSD:
63+
* `arm64`: run-time feature detection is implemented by querying `sysctl`.
64+
65+
* Windows:
66+
* `arm64`: run-time feature detection is implemented by querying `IsProcessorFeaturePresent`.
67+
6068
# License
6169

6270
This project is licensed under either of

0 commit comments

Comments
 (0)