Skip to content

wasm-mutate: add export mutator - #2639

Open
GtechGovind wants to merge 2 commits into
bytecodealliance:mainfrom
GtechGovind:fix/add-export-mutation
Open

wasm-mutate: add export mutator#2639
GtechGovind wants to merge 2 commits into
bytecodealliance:mainfrom
GtechGovind:fix/add-export-mutation

Conversation

@GtechGovind

Copy link
Copy Markdown
Contributor

Summary

  • add a wasm-mutate mutator that exports a randomly selected existing function, table, memory, global, or tag
  • preserve existing exports and create the export section at the correct position when absent
  • account for local tag sections so tags are available to the mutator
  • disable the mutation when preserving semantics or reducing size

Part of #415.

Testing

  • cargo test -p wasm-mutate
  • cargo clippy -p wasm-mutate --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

@GtechGovind
GtechGovind marked this pull request as ready for review September 7, 2026 05:43
@GtechGovind
GtechGovind requested a review from a team as a code owner September 7, 2026 05:43
@GtechGovind
GtechGovind requested review from pchickey and removed request for a team September 7, 2026 05:43
@GtechGovind
GtechGovind marked this pull request as draft September 7, 2026 06:14
@alexcrichton

Copy link
Copy Markdown
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
GtechGovind marked this pull request as ready for review September 11, 2026 19:32
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