-
Notifications
You must be signed in to change notification settings - Fork 56
Closed
Description
random_get has the following signature:
pub fn random_get(arg0: i32, arg1: i32) -> i32;Meanwhile in the witx files it's defined as:
(typename $size u32)
(@interface func (export "random_get")
;;; The buffer to fill with random data.
(param $buf (@witx pointer u8))
(param $buf_len $size)
(result $error (expected (error $errno)))
)
Assuming buffer length is casted from usize to i32, would it work correctly? Note that according to this comment:
none of our 3 WASM environments (Emscripten, wasi-libc, wasm32-unknown-unknown) enforce
isize::MAXright now
Is there a reason why all arguments and return values are defined use i32 instead of more descriptive types used in the witx files?
Metadata
Metadata
Assignees
Labels
No labels