From 546490a95eb13cede87df0d85516053cb7588acf Mon Sep 17 00:00:00 2001 From: Dennis Kawurek Date: Thu, 8 May 2025 19:51:16 +0200 Subject: [PATCH] fix: build errors for WASI target (#151) --- examples/wasi/Cargo.toml | 4 +--- examples/wasi/README.md | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/examples/wasi/Cargo.toml b/examples/wasi/Cargo.toml index 509bfde..eeaa75a 100644 --- a/examples/wasi/Cargo.toml +++ b/examples/wasi/Cargo.toml @@ -1,7 +1,5 @@ - - [package] -name = "wasi" +name = "wasi-mcp-example" edition = { workspace = true } version = { workspace = true } authors = { workspace = true } diff --git a/examples/wasi/README.md b/examples/wasi/README.md index ca5e661..45acc94 100644 --- a/examples/wasi/README.md +++ b/examples/wasi/README.md @@ -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`. \ No newline at end of file