Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Interoperability of array types with host #146

Closed
@Horcrux7

Description

@Horcrux7

How would the interoperability of array types with the host (JavaScript) work? For example I have define an i8 array and an import like:

(type $bytes (array (field i8)))
(import "foo" "bar" (func $bar(param $val (ref null $bytes))))

If I call this function, can I expect a Uint8Array in JavaScript and a byte pointer in another host?

If so, shouldn't we then predefine these primitive arrays as own type and add the type mapping to the proposal?

Or is this only possible via interface types? What will I receive without such interface type definition?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions