fitzgen opened PR #11176 from fitzgen:instruction-data-map to bytecodealliance:main:
This allows you to map some functions, described by the given
InstructionMapper, over each of the entitities in an instruction, producing a newInstructionData.I intend to use this as part of an inliner API for Cranelift that I am developing as part of prototyping Wasmtime's compile-time builtins.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
fitzgen requested wasmtime-compiler-reviewers for a review on PR #11176.
fitzgen requested abrown for a review on PR #11176.
fitzgen requested wasmtime-default-reviewers for a review on PR #11176.
abrown commented on PR #11176:
I'll take an in-depth look at this after the weekend?
abrown created PR review comment:
It's weird that this missing space didn't trigger a formatting error during CI prior to this; is it possible this crate isn't being checked?
abrown submitted PR review:
Makes sense!
fitzgen submitted PR review.
fitzgen created PR review comment:
I think the whole crate disabled
rustfmtor something, but I haven't looked into it yet.
fitzgen updated PR #11176.
fitzgen has enabled auto merge for PR #11176.
fitzgen merged PR #11176.
bjorn3 submitted PR review.
bjorn3 created PR review comment:
Was it necessary to pull in a new dependency for a single function?
fitzgen submitted PR review.
fitzgen created PR review comment:
It's already in the workspace and vetted, so it didn't seem like a big deal.
bjorn3 submitted PR review.
bjorn3 created PR review comment:
It was previously not a Cranelift dependency. Cranelift is slowly getting more and more dependencies.
fitzgen submitted PR review.
fitzgen created PR review comment:
Sharing common code via dependencies is not bad in and of itself IMO, and is actually generally good, especially when it is already vetted and relied upon in sibling projects.
Of course, there is the potential downside of from-scratch compile times getting a little worse. I'm happy to review a PR replacing the dependency with the hand-rolled equivalent function if you measure a from-scratch compile time regression and want to send such a PR, but I don't personally have the cycles to investigate all that myself at the moment.
Last updated: Dec 06 2025 at 06:05 UTC