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

wamr-python: Enable debugging WASM and grant dir access #2449

Merged
merged 6 commits into from
Aug 15, 2023

Conversation

tonibofarull
Copy link
Contributor

@tonibofarull tonibofarull commented Aug 11, 2023

Enables debugging a WASM loaded and executed from Python.
Exposes API to enable access to list of host directories. Similar to --dir in iwasm.

@tonibofarull tonibofarull changed the title wamr-python: Enable debugging WASM and set WASI args wamr-python: Enable debugging WASM and grant dir access Aug 11, 2023
class ExecEnv:
def __init__(self, module_inst: Instance, stack_size: int = 65536):
def __init__(self, module_inst: Instance | None = None, stack_size: int = 65536):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not sure module_inst is Noneable. It should be quite critical. Please make more tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have create InternalExecEnv class to deal with this particular case: 0cf58c1
There's an example of how to use it here: d306cc8

@tonibofarull tonibofarull force-pushed the update-wamr-py branch 2 times, most recently from e224b30 to d56e0e1 Compare August 14, 2023 12:33
Copy link
Contributor

@wenyongh wenyongh left a comment

Choose a reason for hiding this comment

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

LGTM

@wenyongh wenyongh merged commit 571c057 into bytecodealliance:main Aug 15, 2023
1 check passed
@tonibofarull tonibofarull deleted the update-wamr-py branch August 15, 2023 08:21
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
…ance#2449)

- Enable debugging a WASM loaded and executed from Python.
- Expose API to enable access to list of host directories. Similar to --dir in iwasm.
- Add another python language binding sample: native-symbol.
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.

3 participants