Skip to content

Commit 546490a

Browse files
fix: build errors for WASI target (#151)
1 parent 57e14c5 commit 546490a

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

examples/wasi/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
2-
31
[package]
4-
name = "wasi"
2+
name = "wasi-mcp-example"
53
edition = { workspace = true }
64
version = { workspace = true }
75
authors = { workspace = true }

examples/wasi/README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1+
# Example for WASI-p2
2+
3+
Build:
4+
15
```sh
2-
cargo build -p wasi --target wasm32-wasip2
3-
npx @modelcontextprotocol/inspector wasmtime target/wasm32-wasip2/debug/wasi.wasm
6+
cargo build -p wasi-mcp-example --target wasm32-wasip2
47
```
8+
9+
Run:
10+
11+
```
12+
npx @modelcontextprotocol/inspector wasmtime target/wasm32-wasip2/debug/wasi_mcp_example.wasm
13+
```
14+
15+
*Note:* Change `wasmtime` to a different installed run time, if needed.
16+
17+
The printed URL of the MCP inspector can be opened and a connection to the module established via `STDIO`.

0 commit comments

Comments
 (0)