Skip to content

Allow function resumption after running out of fuel #1498

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

Merged
merged 30 commits into from
May 4, 2025

Conversation

Robbepop
Copy link
Member

@Robbepop Robbepop commented May 2, 2025

Closes #696.

cc @rib @tomaka @AbleTheAbove

This PR implements this ResumableCall design:
image

Copy link

codecov bot commented May 2, 2025

Codecov Report

Attention: Patch coverage is 67.70428% with 83 lines in your changes missing coverage. Please review.

Project coverage is 70.76%. Comparing base (7777122) to head (3691c29).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/wasmi/src/engine/resumable.rs 64.28% 30 Missing ⚠️
crates/wasmi/tests/integration/resumable_call.rs 48.57% 18 Missing ⚠️
crates/wasmi/src/engine/executor/mod.rs 70.21% 14 Missing ⚠️
crates/wasmi/src/error.rs 75.00% 4 Missing ⚠️
crates/wast/src/lib.rs 91.17% 3 Missing ⚠️
crates/core/src/limiter.rs 0.00% 2 Missing ⚠️
crates/core/src/memory/error.rs 0.00% 2 Missing ⚠️
crates/core/src/table/error.rs 0.00% 2 Missing ⚠️
crates/wasmi/src/engine/code_map.rs 0.00% 2 Missing ⚠️
crates/wasmi/src/engine/executor/instrs.rs 75.00% 2 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1498      +/-   ##
==========================================
- Coverage   70.80%   70.76%   -0.05%     
==========================================
  Files         175      175              
  Lines       16422    16566     +144     
==========================================
+ Hits        11628    11723      +95     
- Misses       4794     4843      +49     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Robbepop
Copy link
Member Author

Robbepop commented May 3, 2025

At this point the feature is mostly implemented and even integrated into Wasmi's Wast runner to use the resumable call API to execute the official Wasm spec testsuite and ... it mostly works. A few (2-3) test cases do not yet work properly and need to be investigated.

In case anybody wonders how using the API looks like:
https://github.com/wasmi-labs/wasmi/blob/rf-integrate-call-resumption-with-fuel/crates/wast/src/lib.rs#L558

@Robbepop Robbepop merged commit 1a31914 into main May 4, 2025
17 of 19 checks passed
@Robbepop Robbepop deleted the rf-integrate-call-resumption-with-fuel branch May 4, 2025 10:26
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.

Allow resumable calls to recover after running out of fuel
1 participant