Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add runner script #31

Merged
merged 8 commits into from
Dec 9, 2024
Merged

Add runner script #31

merged 8 commits into from
Dec 9, 2024

Conversation

sskeirik
Copy link

@sskeirik sskeirik commented Dec 7, 2024

This PR makes the following changes:

  1. it adds a runner script to test the standalone ULM Wasm binary
  2. it adds some documentation for the above script
  3. it adds the runner script as a poetry run subcommand

Note that the example command given in the README will not fully evaluate due to missing imports --- however, it does evaluate far enough to demonstrate that the script runner works.

Also note that the script runner is a slight modification of the wasm2kast script. You can find out what changed by running the diff command:

diff pykwasm/src/pykwasm/wasm2kast.py pykwasm/src/pykwasm/run_wasm.py

pykwasm/src/pykwasm/run_wasm.py Show resolved Hide resolved
top_sort = KSort('GeneratedTopCell')
config_kast = runner.definition.init_config(top_sort)
symbolic_config, init_subst = split_config_from(config_kast)
init_subst['K_CELL'] = KSequence(module)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case you will wrap the module in a constructor in the other PR, you should also wrap it here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this pointer.

pykwasm/src/pykwasm/run_wasm.py Outdated Show resolved Hide resolved
Base automatically changed from initial-ulm-hook-impl to master December 9, 2024 22:57
@sskeirik sskeirik merged commit 56c32e7 into master Dec 9, 2024
2 checks passed
@sskeirik sskeirik deleted the runner_script_v2 branch December 9, 2024 23:09
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