Skip to content

Commit 82e0f13

Browse files
committed
fix warning
1 parent 54b783a commit 82e0f13

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/backends/wasi_p2_3.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use core::{mem::MaybeUninit, ptr::copy_nonoverlapping};
66
#[cfg(not(target_env = "p3"))]
77
compile_error!("Unknown version of WASI (only previews 1, 2 and 3 are supported)");
88

9-
// We use manual bindings to prevent Cargo.lock bloat.
9+
// Use manual bindings instead of `wasip2/3` crates to prevent Cargo.lock bloat.
1010
//
1111
// Technically, such manual bindings may not work since we also have to provide
1212
// type information which is expected by `wasm-component-ld`, but we assume that
@@ -16,7 +16,8 @@ compile_error!("Unknown version of WASI (only previews 1, 2 and 3 are supported)
1616
// See https://github.com/rust-random/getrandom/pull/828 for more information.
1717
#[cfg_attr(target_env = "p2", link(wasm_import_module = "wasi:random/random@0.2.0"))]
1818
// TODO: drop the RC part on full WASIp3 release
19-
#[cfg_attr(target_env = "p3", link(wasm_import_module = "wasi:random/random@0.3.0-rc-2026-01-06"))]
19+
// TODO(MSRV-1.92): Use `target_env = "p3"`
20+
#[cfg_attr(not(target_env = "p2"), link(wasm_import_module = "wasi:random/random@0.3.0-rc-2026-01-06"))]
2021
unsafe extern "C" {
2122
#[link_name = "get-random-u64"]
2223
safe fn get_random_u64() -> u64;

0 commit comments

Comments
 (0)