File tree Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,8 @@ sparc64-unknown-linux-gnu \
96
96
sparcv9-sun-solaris \
97
97
wasm32-unknown-emscripten \
98
98
wasm32-unknown-unknown \
99
+ wasm32-wasip1 \
100
+ wasm32-wasip2 \
99
101
x86_64-linux-android \
100
102
x86_64-unknown-freebsd \
101
103
x86_64-unknown-linux-gnu \
@@ -231,12 +233,29 @@ else
231
233
no_dist_targets=" "
232
234
fi
233
235
236
+ case " $rust " in
237
+ " stable" ) supports_wasi_pn=1 ;;
238
+ " beta" ) supports_wasi_pn=1 ;;
239
+ " nightly" ) supports_wasi_pn=1 ;;
240
+ * ) supports_wasi_pn=0 ;;
241
+ esac
242
+
234
243
for target in $targets ; do
235
244
if echo " $target " | grep -q " $filter " ; then
236
245
if [ " $os " = " windows" ]; then
237
246
TARGET=" $target " ./ci/install-rust.sh
238
247
test_target " $target "
239
248
else
249
+ # `wasm32-wasip1` was renamed from `wasm32-wasi`
250
+ if [ " $target " = " wasm32-wasip1" ] && [ " $supports_wasi_pn " = " 0" ]; then
251
+ target=" wasm32-wasi"
252
+ fi
253
+
254
+ # `wasm32-wasip2` only exists in recent versions of Rust
255
+ if [ " $target " = " wasm32-wasip2" ] && [ " $supports_wasi_pn " = " 0" ]; then
256
+ continue
257
+ fi
258
+
240
259
test_target " $target "
241
260
fi
242
261
Original file line number Diff line number Diff line change @@ -384,15 +384,17 @@ cfg_if! {
384
384
} else {
385
385
// `addr_of!(EXTERN_STATIC)` is now safe; remove `unsafe` when MSRV >= 1.82
386
386
#[ allow( unused_unsafe) ]
387
- pub static CLOCK_MONOTONIC : clockid_t = clockid_t( core:: ptr:: addr_of!( _CLOCK_MONOTONIC) ) ;
387
+ pub static CLOCK_MONOTONIC : clockid_t =
388
+ unsafe { clockid_t( core:: ptr:: addr_of!( _CLOCK_MONOTONIC) ) } ;
388
389
#[ allow( unused_unsafe) ]
389
390
pub static CLOCK_PROCESS_CPUTIME_ID : clockid_t =
390
- clockid_t( core:: ptr:: addr_of!( _CLOCK_PROCESS_CPUTIME_ID) ) ;
391
+ unsafe { clockid_t( core:: ptr:: addr_of!( _CLOCK_PROCESS_CPUTIME_ID) ) } ;
391
392
#[ allow( unused_unsafe) ]
392
- pub static CLOCK_REALTIME : clockid_t = clockid_t( core:: ptr:: addr_of!( _CLOCK_REALTIME) ) ;
393
+ pub static CLOCK_REALTIME : clockid_t =
394
+ unsafe { clockid_t( core:: ptr:: addr_of!( _CLOCK_REALTIME) ) } ;
393
395
#[ allow( unused_unsafe) ]
394
396
pub static CLOCK_THREAD_CPUTIME_ID : clockid_t =
395
- clockid_t( core:: ptr:: addr_of!( _CLOCK_THREAD_CPUTIME_ID) ) ;
397
+ unsafe { clockid_t( core:: ptr:: addr_of!( _CLOCK_THREAD_CPUTIME_ID) ) } ;
396
398
}
397
399
}
398
400
You can’t perform that action at this time.
0 commit comments