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

fix: reset plugin on call #80

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

chrisdickinson
Copy link
Contributor

This aligns the js-sdk with libextism behavior 1.

@chrisdickinson chrisdickinson requested a review from zshipko July 24, 2024 17:47
@zshipko
Copy link
Contributor

zshipko commented Jul 24, 2024

Will this reset all vars too? When the Rust implementation calls reset the vars are left untouched since they're copied into host memory.

@chrisdickinson chrisdickinson force-pushed the chris/20240724-reset-plugin-on-call branch from 3ab6c5d to 384e194 Compare July 25, 2024 00:11
@chrisdickinson
Copy link
Contributor Author

Ah, good catch! The newest changes will preserve vars across calls. I went with your initial change –moving the variable values into Uint8Array instances– and wired var_get/var_set to proxy up to the host when running in a background worker.

Copy link
Contributor

@zshipko zshipko left a comment

Choose a reason for hiding this comment

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

Ah, good catch! The newest changes will preserve vars across calls. I went with your initial change –moving the variable values into Uint8Array instances– and wired var_get/var_set to proxy up to the host when running in a background worker.

That complicates things a bit - but looks good!

@chrisdickinson chrisdickinson force-pushed the chris/20240724-reset-plugin-on-call branch from 384e194 to f12b5cf Compare July 25, 2024 21:24
@chrisdickinson chrisdickinson merged commit f12b5cf into main Jul 25, 2024
5 checks passed
@chrisdickinson chrisdickinson deleted the chris/20240724-reset-plugin-on-call branch July 25, 2024 21:30
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