Broken generated code indentation for resources in some cases
Type annotations that refer to non-yet-declared types confuse CPython, so we disable them
However, MyPy has no trouble with them, so we enable them by default for the bindings subcommand
Support WIT version annotations (i.e. pass them through to the generated component)
This partially addresses #19, but doesn't support importing or exporting multiple versions of the same interface
Update the http example to match wasi:http@0.2.0-rc-2023-10-18
Update to Wasmtime 14 and the latest wit-parser, wit-component, etc.
and update the WASI preview 1 adapter to match
This also bumps the version to 0.6.0.
Note that I've had to remove the matrix-math example since wasmtime-py does not yet support resources. Although the example itself doesn't use them, the new WASI Preview 1 adapter pulls them in as WASI Preview 2 imports, and there's no feasible way to work around that. Ideally, we'd provide the option to allow users to supply their own adapter, in which case we could use a pre-resource version of the adapter. However, that won't work given that pre-initialization is central to how componentize-py works. Hopefully we can bring back this example in the future, e.g. when wasmtime-py adds support for resources.
This fixes various issues:
bindings
subcommandhttp
example to matchwasi:http@0.2.0-rc-2023-10-18
wit-parser
,wit-component
, etc.This also bumps the version to 0.6.0.
Note that I've had to remove the
matrix-math
example sincewasmtime-py
does not yet support resources. Although the example itself doesn't use them, the new WASI Preview 1 adapter pulls them in as WASI Preview 2 imports, and there's no feasible way to work around that. Ideally, we'd provide the option to allow users to supply their own adapter, in which case we could use a pre-resource version of the adapter. However, that won't work given that pre-initialization is central to howcomponentize-py
works. Hopefully we can bring back this example in the future, e.g. whenwasmtime-py
adds support for resources.