Skip to content

Commit 1d38d68

Browse files
authored
fix: exclude WASI example from workspace to avoid linker errors (#541)
* fix: exclude WASI example from workspace to avoid linker errors on Mac/arm64 Cargo uses the macOS host linker for workspace builds, but that linker cannot resolve WASI WebAssembly imports (such as _wasi:cli/[email protected]). As a result, including a WASI crate in the workspace causes builds to fail on macOS systems using arm64. Solution: Mark the WASI example as non-default by excluding it from the workspace members. This makes the WASI package optional, so `cargo build` won't touch it, and it can be built explicitly when needed with: cargo build -p wasi-mcp-example --target wasm32-wasip2 Signed-off-by: tanish111 <[email protected]> * fix: make WASI example standalone for CI compatibility Replace workspace inheritance with explicit values in examples/wasi/Cargo.toml since excluded packages cannot inherit from workspace. This fixes CI manifest parsing errors when building WASI example explicitly. Signed-off-by: tanish111 <[email protected]> * fix: exclude examples from default builds using default-members Only core crates are built by default, preventing WASI linker errors on macOS while keeping it in workspace for property inheritance. Signed-off-by: tanish111 <[email protected]> --------- Signed-off-by: tanish111 <[email protected]>
1 parent b6cbd39 commit 1d38d68

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[workspace]
22
members = ["crates/rmcp", "crates/rmcp-macros", "examples/*"]
3+
default-members = ["crates/rmcp", "crates/rmcp-macros"]
34
resolver = "2"
45

56
[workspace.dependencies]

0 commit comments

Comments
 (0)