Skip to content

Commit 95ca6e9

Browse files
authored
Merge pull request #30 from dhil/wasmfx-merge
Merge with upstream
2 parents 6d38d1a + 82bb277 commit 95ca6e9

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ jobs:
5858
fail-fast: false
5959
matrix:
6060
os: [ubuntu-latest, macos-latest, windows-latest]
61-
lang: [c, rust, teavm-java, go, csharp, moonbit]
61+
# moonbit removed from language matrix for now - causing CI failures
62+
lang: [c, rust, teavm-java, go, csharp]
6263
runs-on: ${{ matrix.os }}
6364
steps:
6465
- uses: actions/checkout@v4

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,11 @@ world host {
185185

186186
### Guest: Rust
187187

188-
The Rust compiler supports a native `wasm32-wasip1` target and can be added to
188+
The Rust compiler since version 1.82 supports a native `wasm32-wasip2` target and can be added to
189189
any `rustup`-based toolchain with:
190190

191191
```sh
192-
rustup target add wasm32-wasip1
192+
rustup target add wasm32-wasip2
193193
```
194194

195195
In order to compile a wasi dynamic library, the following must be added to the
@@ -244,17 +244,15 @@ generated code (which is probably also a bug in `wit-bindgen`), you can use
244244
This project can then be built with:
245245

246246
```sh
247-
cargo build --target wasm32-wasip1
248-
wasm-tools component new ./target/wasm32-wasip1/debug/my-project.wasm \
249-
-o my-component.wasm --adapt ./wasi_snapshot_preview1.reactor.wasm
247+
cargo build --target wasm32-wasip2
250248
```
251249

252-
This creates a `my-component.wasm` file which is suitable to execute in any
250+
This creates a `./target/wasm32-wasip2/debug/my-project.wasm` file which is suitable to execute in any
253251
component runtime. Using `wasm-tools` you can inspect the binary as well, for
254252
example inferring the WIT world that is the component:
255253

256254
```sh
257-
wasm-tools component wit my-component.wasm
255+
wasm-tools component wit ./target/wasm32-wasip2/debug/my-project.wasm
258256
# world my-component {
259257
# import print: func(msg: string)
260258
# export run: func()

0 commit comments

Comments
 (0)