Skip to content

Conversation

jedisct1
Copy link
Contributor

Implements local documentation serving via zig std command as suggested in #7.

The MCP server now uses the locally installed Zig compiler by default, ensuring documentation always matches the user's actual Zig version.

Fixes #7

@Afirium
Copy link
Member

Afirium commented Sep 10, 2025

Hey @jedisct1, thank you very much for the implementation!

I tested it and it works almost as expected, here are a few things that need to be changed:

  1. Add zig-out/ and package-lock.json to .gitignore (I forgot to do this).
  2. Remove zig-out/main.wasm and package-lock.json files from PR.
  3. We need to remove the getLocalMainWasm function and always use the wasm module that comes with the package. Because in this case we will get HTML instead of markdown. I initially forked the zig std docs module to return everything in MD format to reduce token usage. This is what the "local" wasm version returns now:
image

After that, I will merge it and push a new release. Thanks again!

Implements local documentation serving via `zig std` command
as suggested in zig-wasm#7.

The MCP server now uses the locally installed Zig compiler by default,
ensuring documentation always matches the user's actual Zig version.
@Afirium Afirium merged commit 8227834 into zig-wasm:main Sep 10, 2025
@Afirium
Copy link
Member

Afirium commented Sep 10, 2025

Great, thanks!

@jedisct1 jedisct1 deleted the local-server branch September 10, 2025 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use the locally installed Zig binary to fetch documentation

2 participants