Skip to content
New issue

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

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

Already on GitHub? # to your account

How to access wasm module's Memory? #146

Closed
ppedziwiatr opened this issue Jan 22, 2024 · 3 comments · Fixed by #147
Closed

How to access wasm module's Memory? #146

ppedziwiatr opened this issue Jan 22, 2024 · 3 comments · Fixed by #147

Comments

@ppedziwiatr
Copy link

ppedziwiatr commented Jan 22, 2024

Hey,

is it possible to access the wasm module's memory (i.e. the https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Memory) via the instance of the QuickJS, runtime or maybe context?

I would simply like to:

  1. 'dump' and store the memory after evaluating the script
  2. read the stored memory into the WASM module at the next evaluation
@justjake
Copy link
Owner

I looked into this a bit but didn't see a great way to do it in the Emscripten APIs. Access would be from the QuickJSEmscriptenModule class.

@justjake
Copy link
Owner

Actually, it seems possible.

@ppedziwiatr
Copy link
Author

wow, that was quick ;-) thank you!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants