wasm-mutate: add export mutator - #2639
Merged
alexcrichton merged 3 commits intoSep 14, 2026
Merged
Conversation
GtechGovind
marked this pull request as ready for review
September 7, 2026 05:43
GtechGovind
marked this pull request as draft
September 7, 2026 06:14
Member
|
Thanks @GtechGovind! FWIW while these PRs are in draft reviewers aren't assigned and typically don't look too closely. When you're ready feel free to take them out of draft and a reviewer will be assigned. |
GtechGovind
marked this pull request as ready for review
September 11, 2026 19:32
alexcrichton
approved these changes
Sep 14, 2026
alexcrichton
left a comment
Member
There was a problem hiding this comment.
Thanks! Just one minor comment but otherwise looks good to me
Comment on lines
+68
to
+76
| let kind = match export.kind { | ||
| wasmparser::ExternalKind::Func => ExportKind::Func, | ||
| wasmparser::ExternalKind::Table => ExportKind::Table, | ||
| wasmparser::ExternalKind::Memory => ExportKind::Memory, | ||
| wasmparser::ExternalKind::Global => ExportKind::Global, | ||
| wasmparser::ExternalKind::Tag => ExportKind::Tag, | ||
| wasmparser::ExternalKind::FuncExact => unreachable!(), | ||
| }; | ||
| exports.export(export.name, kind, export.index); |
Member
There was a problem hiding this comment.
Could this use the wasm_encoder::reencode module perhaps?
alexcrichton
requested review from
alexcrichton
and removed request for
pchickey
September 14, 2026 14:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wasm-mutatemutator that exports a randomly selected existing function, table, memory, global, or tagPart of #415.
Testing
cargo test -p wasm-mutatecargo clippy -p wasm-mutate --all-targets -- -D warningscargo fmt --all -- --checkgit diff --check