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

feat(globals) Support exported global variables #32

Merged
merged 6 commits into from
Feb 7, 2020

Conversation

Hywan
Copy link
Contributor

@Hywan Hywan commented Feb 7, 2020

Fix #30

This PR introduces an Exported Global API. Usage is super simple:

instance = Wasmer::Instance.new bytes
x = instance.globals.x

assert x.mutable
assert_equal x.value, 7

x.value = 42

assert_equal x.value, 42

@Hywan Hywan added 🎉 enhancement New feature or request 📦 component-extension About the Ruby extension written in Rust 📦 component-runtime About the Wasm runtime 🧪 tests I love tests labels Feb 7, 2020
@Hywan Hywan self-assigned this Feb 7, 2020
@Hywan Hywan mentioned this pull request Feb 7, 2020
@Hywan Hywan marked this pull request as ready for review February 7, 2020 12:24
@Hywan Hywan merged commit 2f15bfd into wasmerio:master Feb 7, 2020
@ljulliar
Copy link

Hi Ivan,

Are you thinking of releasing the wasmer rubygem 0.3.1 with this new
feature for globals ?

Thanks!

@Hywan
Copy link
Contributor Author

Hywan commented Feb 17, 2020

I want to wait for a last feature before releasing a new version. But if that's important for you, I can run a release before :-).

@ljulliar
Copy link

ljulliar commented Feb 17, 2020 via email

@Hywan
Copy link
Contributor Author

Hywan commented Mar 3, 2020

@ljulliar 0.4.0 has been released, https://github.com/wasmerio/ruby-ext-wasm/releases/tag/0.4.0 🙂. Thanks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 component-extension About the Ruby extension written in Rust 📦 component-runtime About the Wasm runtime 🎉 enhancement New feature or request 🧪 tests I love tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export Wasm globals ?
2 participants