Skip to content

[witx] Make use import individual names from other modules #378

@sunfishcode

Description

@sunfishcode

Witx's current mechanism for supporting declarations across multiple files is use which imports the contents of one file into another. This was a simple way to get witx started, however it isn't amenable to splitting up WASI into multiple modules.

A better approach would be to have use work more like a proper module system in high-level programming languages, where one can use specific items from other modules.

So instead of

(use "typenames.witx")

We should have something like

(use $timestamp from $wasi_filesystem)

where $wasi_filesystem is a module which defines a $timestamp` type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions