4646//! enabled `wasm-bindgen` will be used. If neither feature is enabled,
4747//! `getrandom` will always fail.
4848//!
49- //! The WASI target `wasm32-unknown- wasi` uses the `__wasi_random_get`
50- //! function defined by the WASI standard.
49+ //! The WASI target `wasm32-wasi` uses the `__wasi_random_get` function defined
50+ //! by the WASI standard.
5151//!
5252//!
5353//! ## Early boot
@@ -143,7 +143,7 @@ extern crate std;
143143 target_os = "linux" ,
144144 all(
145145 target_arch = "wasm32" ,
146- not( target_env = "wasi" )
146+ not( target_os = "wasi" )
147147 ) ,
148148) ) ]
149149mod utils;
@@ -190,13 +190,13 @@ mod_use!(cfg(target_os = "redox"), use_file);
190190mod_use ! ( cfg( target_os = "solaris" ) , solaris_illumos) ;
191191mod_use ! ( cfg( windows) , windows) ;
192192mod_use ! ( cfg( target_env = "sgx" ) , sgx) ;
193- mod_use ! ( cfg( target_env = "wasi" ) , wasi) ;
193+ mod_use ! ( cfg( target_os = "wasi" ) , wasi) ;
194194
195195mod_use ! (
196196 cfg( all(
197197 target_arch = "wasm32" ,
198198 not( target_os = "emscripten" ) ,
199- not( target_env = "wasi" ) ,
199+ not( target_os = "wasi" ) ,
200200 feature = "wasm-bindgen"
201201 ) ) ,
202202 wasm32_bindgen
@@ -206,7 +206,7 @@ mod_use!(
206206 cfg( all(
207207 target_arch = "wasm32" ,
208208 not( target_os = "emscripten" ) ,
209- not( target_env = "wasi" ) ,
209+ not( target_os = "wasi" ) ,
210210 not( feature = "wasm-bindgen" ) ,
211211 feature = "stdweb" ,
212212 ) ) ,
@@ -237,7 +237,7 @@ mod_use!(
237237 target_arch = "wasm32" ,
238238 any(
239239 target_os = "emscripten" ,
240- target_env = "wasi" ,
240+ target_os = "wasi" ,
241241 feature = "wasm-bindgen" ,
242242 feature = "stdweb" ,
243243 ) ,
0 commit comments