-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
various updates to support
wasi:http@0.2.0-rc-2023-10-18
This fixes various issues: - 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. Signed-off-by: Joel Dice <joel.dice@fermyon.com> bundle `poll_loop.py` to make it available during pre-init This module is useful enough that it makes sense to bundle it as part of `componentize-py`. Eventually, we may want to distribute it via PyPI as a helper library, but we'll settle for bundling for now. It shouldn't add any overhead for apps that don't `import` it. Signed-off-by: Joel Dice <joel.dice@fermyon.com>
- Loading branch information
Showing
71 changed files
with
3,213 additions
and
1,113 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
The subdirectory of this directory contains a build of the WASI Preview 1 | ||
component adapter. It was built from commit `e8766e49` of | ||
https://github.com/dicej/wasmtime using the | ||
`ci/build-wasi-preview1-component-adapter.sh` script. | ||
|
||
TODO: Switch back to upstream once | ||
https://github.com/bytecodealliance/wasmtime/pull/7444 has been merged and | ||
released. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.