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

Update to the new fuel APIs #281

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

kpreisser
Copy link
Contributor

Update to the new fuel APIs introduced in bytecodealliance/wasmtime#7298.

I switched to a property so that it's possible e.g. to add or consume fuel with code like this:

store.Fuel += 100;

// Consume fuel, throwing an OverflowException if too little fuel is available.
checked {
    store.Fuel -= 150;
}

What do you think?
Thanks!

Copy link
Member

@peterhuene peterhuene left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@peterhuene peterhuene merged commit 9fbad84 into bytecodealliance:main Oct 24, 2023
@kpreisser kpreisser deleted the new-fuel-apis branch October 24, 2023 18:41
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