Skip to content

Commit d0a1aef

Browse files
Rollup merge of #157452 - tyilo:fix-wasi-links, r=joboet
Fix WASI links
2 parents 150c383 + a8a5934 commit d0a1aef

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! "preview2". This target in rustc uses the previous version of the proposal.
55
//!
66
//! This target uses the syscalls defined at
7-
//! <https://github.com/WebAssembly/WASI/tree/main/legacy/preview1>.
7+
//! <https://github.com/WebAssembly/WASI/tree/wasi-0.1/preview1>.
88
//!
99
//! Note that this target was historically called `wasm32-wasi` originally and
1010
//! was since renamed to `wasm32-wasip1` after the preview2 target was

library/std/src/random.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ use crate::sys::random as sys;
4545
/// TEEOS | `TEE_GenerateRandom`
4646
/// UEFI | [`EFI_RNG_PROTOCOL`](https://uefi.org/specs/UEFI/2.10/37_Secure_Technologies.html#random-number-generator-protocol)
4747
/// VxWorks | `randABytes` after waiting for `randSecure` to become ready
48-
/// WASI | [`random_get`](https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md#-random_getbuf-pointeru8-buf_len-size---result-errno)
48+
/// WASIp1 | [`random_get`](https://github.com/WebAssembly/WASI/blob/wasi-0.1/preview1/docs.md#-random_getbuf-pointeru8-buf_len-size---result-errno)
49+
/// WASIp2 | [`get-random-bytes`]
50+
/// WASIp3 | [`get-random-bytes`]
4951
/// ZKVM | `sys_rand`
5052
///
5153
/// Note that the sources used might change over time.
@@ -56,6 +58,7 @@ use crate::sys::random as sys;
5658
///
5759
/// [`getrandom`]: https://www.man7.org/linux/man-pages/man2/getrandom.2.html
5860
/// [`/dev/urandom`]: https://www.man7.org/linux/man-pages/man4/random.4.html
61+
/// [`get-random-bytes`]: https://github.com/WebAssembly/WASI/blob/main/proposals/random/imports.md#get-random-bytes-func
5962
#[doc(alias = "getrandom", alias = "getentropy", alias = "arc4random")]
6063
#[derive(Default, Debug, Clone, Copy)]
6164
#[unstable(feature = "random", issue = "130703")]

library/std/src/time.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,16 @@ use crate::sys::{FromInner, IntoInner, time};
112112
/// |-----------|----------------------------------------------------------------------|
113113
/// | SGX | [`insecure_time` usercall]. More information on [timekeeping in SGX] |
114114
/// | UNIX | [clock_gettime] with `CLOCK_MONOTONIC` |
115+
/// | WASI | [clock_gettime] with `CLOCK_MONOTONIC` |
115116
/// | Darwin | [clock_gettime] with `CLOCK_UPTIME_RAW` |
116117
/// | VXWorks | [clock_gettime] with `CLOCK_MONOTONIC` |
117118
/// | SOLID | `get_tim` |
118-
/// | WASI | [__wasi_clock_time_get] with `monotonic` |
119119
/// | Windows | [QueryPerformanceCounter] |
120120
///
121121
/// [currently]: crate::io#platform-specific-behavior
122122
/// [QueryPerformanceCounter]: https://docs.microsoft.com/en-us/windows/win32/api/profileapi/nf-profileapi-queryperformancecounter
123123
/// [`insecure_time` usercall]: https://edp.fortanix.com/docs/api/fortanix_sgx_abi/struct.Usercalls.html#method.insecure_time
124124
/// [timekeeping in SGX]: https://edp.fortanix.com/docs/concepts/rust-std/#codestdtimecode
125-
/// [__wasi_clock_time_get]: https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md#clock_time_get
126125
/// [clock_gettime]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/clock_getres.html
127126
///
128127
/// **Disclaimer:** These system calls might change over time.
@@ -224,17 +223,16 @@ pub struct Instant(time::Instant);
224223
/// |-----------|----------------------------------------------------------------------|
225224
/// | SGX | [`insecure_time` usercall]. More information on [timekeeping in SGX] |
226225
/// | UNIX | [clock_gettime (Realtime Clock)] |
226+
/// | WASI | [clock_gettime (Realtime Clock)] |
227227
/// | Darwin | [clock_gettime (Realtime Clock)] |
228228
/// | VXWorks | [clock_gettime (Realtime Clock)] |
229229
/// | SOLID | `SOLID_RTC_ReadTime` |
230-
/// | WASI | [__wasi_clock_time_get (Realtime Clock)] |
231230
/// | Windows | [GetSystemTimePreciseAsFileTime] / [GetSystemTimeAsFileTime] |
232231
///
233232
/// [currently]: crate::io#platform-specific-behavior
234233
/// [`insecure_time` usercall]: https://edp.fortanix.com/docs/api/fortanix_sgx_abi/struct.Usercalls.html#method.insecure_time
235234
/// [timekeeping in SGX]: https://edp.fortanix.com/docs/concepts/rust-std/#codestdtimecode
236235
/// [clock_gettime (Realtime Clock)]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/clock_getres.html
237-
/// [__wasi_clock_time_get (Realtime Clock)]: https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md#clock_time_get
238236
/// [GetSystemTimePreciseAsFileTime]: https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsystemtimepreciseasfiletime
239237
/// [GetSystemTimeAsFileTime]: https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsystemtimeasfiletime
240238
///

0 commit comments

Comments
 (0)