Skip to content

How to set parameter type to i64 in imported functions #95

@s2x

Description

@s2x

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?

Metadata

Metadata

Assignees

Labels

❓ questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions