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
commit 546490a95e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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`.