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

Add optional .wat module support to Module::new #1328

Merged
merged 3 commits into from
Dec 1, 2024

Conversation

Robbepop
Copy link
Member

@Robbepop Robbepop commented Dec 1, 2024

A test-only wat2wasm function has been implemented several times in the Wasmi codebase, especially in tests which is an indicator that this functionality was crucially missing from Wasmi's module parsing.

Thus we added this feature optionally behind the new wat crate feature in Wasmi.
This also improves Wasmi's Wasmtime API mirroring because Wasmtime also provides .wat parsing support in its Module::new API.

We explicitly do not support .wat parsing in Module::new_streaming since there is no streaming parsing support for .wat files via the used wat crate.

Copy link

codecov bot commented Dec 1, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 81.63%. Comparing base (90ac312) to head (542d970).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/wasmi/src/error.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1328      +/-   ##
==========================================
- Coverage   81.63%   81.63%   -0.01%     
==========================================
  Files         305      305              
  Lines       25283    25287       +4     
==========================================
+ Hits        20639    20642       +3     
- Misses       4644     4645       +1     

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

@Robbepop
Copy link
Member Author

Robbepop commented Dec 1, 2024

The miri job fails due to timeout, so not because of this PR.

@Robbepop Robbepop merged commit c889d43 into main Dec 1, 2024
17 of 19 checks passed
@Robbepop Robbepop deleted the rf-add-wat-module-support branch December 1, 2024 22:05
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.

1 participant