Skip to content

The bindings command put both wit comments // and docs /// in the generated docstrings #177

Open

Description

@r0levrai

I think it should only put the docs ///.

Activity

  1. WhiteAbeLincoln commented on Dec 18, 2025

    @WhiteAbeLincoln
    Contributor

    The issue appears to be with wit_parser, which as far as I can tell makes no distinction between a documentation comment and a regular comment: https://github.com/bytecodealliance/wasm-tools/blob/34b89e38e16d2b23ceeec8820654248d2142b575/crates/wit-parser/src/ast.rs#L1321

    I created a test case in componentize-py that attempts to generate bindings for this wit file. The value in the Docs struct contains a plain comment from // "package of named fields".

    Image

    I did notice that while the WIT reference mentions a special documentation comment format, I can't find anything about this in the specification.

  2. cestercian commented on Sep 19, 2026

    @cestercian
    Contributor

    Taking this — will filter wit // comments out of generated docstrings (keep /// docs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions