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.
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 canuse
specific items from other modules.So instead of
We should have something like
where
$wasi_filesystem is a module which defines a
$timestamp` type.