Conversation
| #[cfg_attr(target_env = "p3", link(wasm_import_module = "wasi:random/random@0.3.0-rc-2026-01-06"))] | ||
| unsafe extern "C" { | ||
| #[link_name = "get-random-u64"] | ||
| safe fn get_random_u64() -> u64; |
There was a problem hiding this comment.
@alexcrichton
Is it fine to use u64 here instead of i64 used by the auto-generated bindings? Otherwise it looks somewhat weird to get i64 from a function named get_random_u64.
There was a problem hiding this comment.
Also, would random@0.3.0-rc-2026-01-06 continue to work after WASI v0.3.0 is released in the same way as was explained by you here? (obviously assuming that get-random-u64 is not changed)
There was a problem hiding this comment.
Is it fine to use u64 here instead of i64 used by the auto-generated bindings?
yep!
Also, would random@0.3.0-rc-2026-01-06 continue to work after WASI v0.3.0 is released in the same way as was explained by you here?
Alas, no, for all future rcs it'll require an update here to change the version string. Once WASIp3 is officially released as 0.3.0 this can be updated to 0.3.0 and that'll be it.
Closes #827