Skip to content

Future extension: builtin string type import #26

Open
@tlively

Description

@tlively

In a future with type imports, we could add a builtin subtype of extern representing JS strings importable as something like (import "wasm:js-string" "string" (type $string (sub extern))). We could then allow the builtin operations to be imported with signatures that accept and return $string references instead of extern references. The benefit of this additional static typing would be that engines would be able to skip the check that the inputs to the builtin operations are actually strings, since the type system would prove that they must be.

Does that seem like a reasonable future direction? Are there any foreseeable problems with it?

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