Skip to content

wasm support for pmcp-macros #278

Description

@simlay

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions