Skip to content

Print params/results of imports - #2654

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:print-more-params-and-results
Sep 11, 2026
Merged

Print params/results of imports#2654
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:print-more-params-and-results

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

This commit is a small change to the wasmprinter logic to print (param ...) and (result ...) for function imports instead of only printing (type N). This helps improve debuggability-at-a-glance since there's no need to cross-reference types, and this is additionally done in preparation for a spec test suite update where this'll be necessary to pass all tests in the extended-name-section proposal.

This has a very large fallout in golden outputs for this repository, hence the very large diff. The only source code change is crates/wasmprinter/src/lib.rs, however.

This commit is a small change to the `wasmprinter` logic to print
`(param ...)` and `(result ...)` for function imports instead of only
printing `(type N)`. This helps improve debuggability-at-a-glance since
there's no need to cross-reference types, and this is additionally done
in preparation for a spec test suite update where this'll be necessary
to pass all tests in the extended-name-section proposal.

This has a very large fallout in golden outputs for this repository,
hence the very large diff. The only source code change is
`crates/wasmprinter/src/lib.rs`, however.
@alexcrichton
alexcrichton requested a review from a team as a code owner September 11, 2026 17:14
@alexcrichton
alexcrichton requested review from pchickey and removed request for a team September 11, 2026 17:14

@pchickey pchickey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement to readability, thanks

@alexcrichton
alexcrichton added this pull request to the merge queue Sep 11, 2026
Merged via the queue into bytecodealliance:main with commit 00f0c06 Sep 11, 2026
37 checks passed
@alexcrichton
alexcrichton deleted the print-more-params-and-results branch September 11, 2026 18:37
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.

2 participants