fix: build errors for WASI target (#151)
This commit is contained in:
parent
57e14c56e8
commit
546490a95e
2 changed files with 16 additions and 5 deletions
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "wasi"
|
name = "wasi-mcp-example"
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
version = { workspace = true }
|
version = { workspace = true }
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,17 @@
|
||||||
|
# Example for WASI-p2
|
||||||
|
|
||||||
|
Build:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cargo build -p wasi --target wasm32-wasip2
|
cargo build -p wasi-mcp-example --target wasm32-wasip2
|
||||||
npx @modelcontextprotocol/inspector wasmtime target/wasm32-wasip2/debug/wasi.wasm
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
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`.
|
||||||
Loading…
Reference in a new issue