add zware-run to run wasm binaries from the command-line #231
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.
An initial version of a command-line program that can take a WASM binary on the command line and a function name and execute it.
It will find missing imports and populate them with "stubs". The stub will log the call and then populate the results with "zeroed" values. An enhancement could be to take multiple files on the command line and link them together before execution.
A few examples of binaries I could use with this was:
Of the ones I tested this seems like a viable strategy to quickly run the binaries from the test suite. The WASM4/Zig binaries would usually just call a function or two and then hit an assert because of the "zeroed" results that are produced by the stubs.