Skip to content

Commit 5f7f113

Browse files
authored
Add wasmtime version compatibility note on README (#192)
* fix: update README to clarify compatibility with Wasmtime versions * fix: correct reference to wasmtime-py in compatibility note
1 parent c66451d commit 5f7f113

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
**A [Bytecode Alliance](https://bytecodealliance.org/) project**
44

55
This is a tool to convert a Python application to a [WebAssembly
6-
component](https://github.com/WebAssembly/component-model). It takes the
6+
component](https://github.com/WebAssembly/component-model). It takes the
77
following as input:
88

99
- a [WIT](https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md) file or directory
@@ -17,7 +17,7 @@ e.g. [`wasmtime`](https://github.com/bytecodealliance/wasmtime).
1717
## Getting Started
1818

1919
First, install [Python 3.10 or later](https://www.python.org/) and
20-
[pip](https://pypi.org/project/pip/) if you don't already have them. Then,
20+
[pip](https://pypi.org/project/pip/) if you don't already have them. Then,
2121
install `componentize-py`:
2222

2323
```shell
@@ -62,6 +62,9 @@ componentize-py -d hello.wit -w hello componentize --stub-wasi app -o app.wasm
6262
To test it, you can install `wasmtime-py` and use it to generate host-side
6363
bindings for the component:
6464

65+
> [!NOTE]
66+
> Due to compatibility issues with `wasmtime-py` versions beyond 38.x, **this example** requires version 38.0.0 or earlier: `pip install "wasmtime==38.0.0"`
67+
6568
```shell
6669
pip install wasmtime
6770
python3 -m wasmtime.bindgen app.wasm --out-dir hello_host
@@ -99,7 +102,7 @@ created.
99102

100103
Currently, the application can only import dependencies during build time, which
101104
means any imports used at runtime must be resolved at the top level of the
102-
application module. For example, if `x` is a module with a submodule named `y`
105+
application module. For example, if `x` is a module with a submodule named `y`
103106
the following may not work:
104107

105108
```python
@@ -110,7 +113,7 @@ class Hello(hello.Hello):
110113
return x.y.foo()
111114
```
112115

113-
That's because importing `x` does not necessarily resolve `y`. This can be
116+
That's because importing `x` does not necessarily resolve `y`. This can be
114117
addressed by modifying the code to import `y` at the top level of the file:
115118

116119
```python

0 commit comments

Comments
 (0)