You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
i try to implement missing function where expected signature is: expected signature: [I32, I64, I32, I32] -> [I32]
my code:
$imports = [
'wasi_unstable' => [
'fd_seek' => function(int $file, int $offset, int $whence, int $newoffset): int {
return 0;
},
]
]
$instance = new Wasm\Instance(__DIR__ . '/demo.wasm', $imports);
when i try to run i get this error: Incorrect import signature, namespace: wasi_unstable, name: fd_seek, expected signature: [I32, I64, I32, I32] -> [I32], found signature: [I32, I32, I32, I32] -> [I32]
How to set parameter type to i64 in imported functions?
The text was updated successfully, but these errors were encountered:
Because PHP has no way to represent an i32 or an i64, I decided to fallback to i32 everytime.
The hack I've in my head is to create a new “type” in PHP, like wasm\i32 and wasm\i64 (2 “value objects”), and use them instead of int. Is it something you would use?
Hi,
i try to implement missing function where expected signature is:
expected signature: [I32, I64, I32, I32] -> [I32]
my code:
when i try to run i get this error:
Incorrect import signature, namespace: wasi_unstable, name: fd_seek, expected signature: [I32, I64, I32, I32] -> [I32], found signature: [I32, I32, I32, I32] -> [I32]
How to set parameter type to i64 in imported functions?
The text was updated successfully, but these errors were encountered: