Add compact import generation in wasm-smith - #2627
Merged
Merged
Conversation
Contributor
Author
|
|
alexcrichton
approved these changes
Aug 27, 2026
alexcrichton
left a comment
Member
There was a problem hiding this comment.
This all looks great to me, thanks! It's expected that this'd generally make things more complicated but everything here looks as I'd expect
social4hyq
pushed a commit
to social4hyq/homebrew-core
that referenced
this pull request
Sep 20, 2026
wasm-tools 1.259.0 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre>## What's Changed * Refactor name resolution of components in the text format by @alexcrichton in bytecodealliance/wasm-tools#2621 * Import component spec tests as a submodule and run them. by @alexcrichton in bytecodealliance/wasm-tools#2623 * Fix name uniqueness with methods/interfaces by @alexcrichton in bytecodealliance/wasm-tools#2625 * Add compact import generation in wasm-smith by @chacailline in bytecodealliance/wasm-tools#2627 * Drop hyphens when testing equality of kebab names by @alexcrichton in bytecodealliance/wasm-tools#2626 * Enable wide-arithmetic by default in wasm-smith by @alexcrichton in bytecodealliance/wasm-tools#2628 * Validate the size of defined component types by @alexcrichton in bytecodealliance/wasm-tools#2624 * Update Wasmtime used in testing/fuzzing by @alexcrichton in bytecodealliance/wasm-tools#2629 * Fix text format outer aliases from recent refactor by @alexcrichton in bytecodealliance/wasm-tools#2631 * Remove `cancellable` immediate from component model intrinsics by @alexcrichton in bytecodealliance/wasm-tools#2630 * Start requiring "strict" indices in the text format by @alexcrichton in bytecodealliance/wasm-tools#2633 * Enable the `cm-implements` and `cm-map` features by default by @alexcrichton in bytecodealliance/wasm-tools#2634 * Clamp sizes of element segments in wasm-smith by @alexcrichton in bytecodealliance/wasm-tools#2632 * Fix wit-smith generating huge types by @alexcrichton in bytecodealliance/wasm-tools#2636 * Fix disallow_traps in wasm-smith with custom page sizes by @alexcrichton in bytecodealliance/wasm-tools#2635 * Resolve Cargo warnings on nightly by @alexcrichton in bytecodealliance/wasm-tools#2642 * Return an error instead of panicking on fixed-length-list size overflow by @zikk090 in bytecodealliance/wasm-tools#2643 * Try to improve performance of `deinline_import_export` by @alexcrichton in bytecodealliance/wasm-tools#2647 * Document a non-obvious method argument by @alexcrichton in bytecodealliance/wasm-tools#2645 * wasm-wave: Clean up syntax docs by @lann in bytecodealliance/wasm-tools#2644 * Update dependency major tracks by @alexcrichton in bytecodealliance/wasm-tools#2649 * Release wasm-tools 1.259.0 by @github-actions[bot] in bytecodealliance/wasm-tools#2650 ## New Contributors * @chacailline made their first contribution in bytecodealliance/wasm-tools#2627 * @zikk090 made their first contribution in bytecodealliance/wasm-tools#2643 **Full Changelog**: https://github.com/bytecodealliance/wasm-tools/compare/v1.258.0...v1.259.0</pre> <p>View the full release notes at <a href="https://github.com/bytecodealliance/wasm-tools/releases/tag/v1.259.0">https://github.com/bytecodealliance/wasm-tools/releases/tag/v1.259.0</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!20061
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.
Updates wasm-smith to generate compact import sections.
Allows wasmtime fuzzing of compact import sections for bytecodealliance/wasmtime#14108.
Module::imports_exports_from_module_shapeandModule::arbitrary_imports_from_availableare also updated to accept compact imports and to generate them when it's enabled in the config.I enabled the proposal by default.
config.rshas a comment saying "Proposals that are not stage4+ are disabled by default." By that logic, we may want to enable wide arithmetic by default too.Outside of
#[cfg(feature = "component-model")],DuplicateImportsBehavior::Disallowedwas only ever created in an if-test inModule::arbitrary_imports, so I had to add a#[cfg]gate to pass CI.The binary format supports empty compact import statements, but it's not clear whether the text format will support them. See WebAssembly/compact-import-section#22. Currently,
wasmparserdoesn't accept them, butwasmprinteroutputs them if given a binary with empty statements.For now, I don't generate empty statements. If they're not allowed, we should update
wasmprinternot to generate them. If they are allowed, we should updatewasmparserto accept them, and probably generate them inwasm-smith.