Love that this project supports webassembly though I notice that the WasmMcpServer uses WasmTool, WasmResource and WasmPrompt rather than ToolHandler, PromptHandler and ResourceHandler. I've not spent a ton of time digging into the macro generation but based on the compilation errors I've gotten, it's generating ToolHandler, PromptHandler, ResourceHandler, etc (which are not supported in webassembly.
Anyway, I think the ToolHandler, PromptHandler and ResourceHandler traits compile to webassembly. Some muckery might be needed with async_trait (like #[async_trait(?Send)] I think was the syntax last time I did this).
Alternatively, one could generate the WasmTool, WasmResource and WasmPrompt in the macro crate (I would rather do the former).
Thoughts? i can submit some PRs if this is something you're interested in supporting.
Love that this project supports webassembly though I notice that the
WasmMcpServerusesWasmTool,WasmResourceandWasmPromptrather thanToolHandler,PromptHandlerandResourceHandler. I've not spent a ton of time digging into the macro generation but based on the compilation errors I've gotten, it's generatingToolHandler,PromptHandler,ResourceHandler, etc (which are not supported in webassembly.Anyway, I think the
ToolHandler,PromptHandlerandResourceHandlertraits compile to webassembly. Some muckery might be needed withasync_trait(like#[async_trait(?Send)]I think was the syntax last time I did this).Alternatively, one could generate the
WasmTool,WasmResourceandWasmPromptin the macro crate (I would rather do the former).Thoughts? i can submit some PRs if this is something you're interested in supporting.