fix: build errors for WASI target (#151)

This commit is contained in:
Dennis Kawurek 2025-05-08 19:51:16 +02:00 committed by GitHub
parent 57e14c56e8
commit 546490a95e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 5 deletions

View file

@ -1,7 +1,5 @@
[package]
name = "wasi"
name = "wasi-mcp-example"
edition = { workspace = true }
version = { workspace = true }
authors = { workspace = true }

View file

@ -1,4 +1,17 @@
# Example for WASI-p2
Build:
```sh
cargo build -p wasi --target wasm32-wasip2
npx @modelcontextprotocol/inspector wasmtime target/wasm32-wasip2/debug/wasi.wasm
cargo build -p wasi-mcp-example --target wasm32-wasip2
```
Run:
```
npx @modelcontextprotocol/inspector wasmtime target/wasm32-wasip2/debug/wasi_mcp_example.wasm
```
*Note:* Change `wasmtime` to a different installed run time, if needed.
The printed URL of the MCP inspector can be opened and a connection to the module established via `STDIO`.