Skip to content

Conversation

mvadari
Copy link
Collaborator

@mvadari mvadari commented Sep 11, 2025

High Level Overview of Change

This PR adds all the WAMR integration code and the host functions specified in XLS-102. It also adds tests for all of this.

Note for reviewers: 10k lines of this PR are just WASM-compiled test fixtures, and another 4k lines are WASM test fixture source code. So while this PR is still quite large, it's not as large as it seems on the surface.

Context of Change

This PR depends on #5790

It is part of an effort to split up #5600 into smaller, more managable-to-review PRs.

XLS-102: XRPLF/XRPL-Standards#303

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Performance (increase or change in throughput and/or latency)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

API Impact

N/A

Test Plan

Several tests are added to this PR.

@mvadari mvadari requested a review from a team as a code owner September 11, 2025 16:11
Copy link

codecov bot commented Sep 11, 2025

Codecov Report

❌ Patch coverage is 92.88103% with 149 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.3%. Comparing base (32f971f) to head (cb62248).

Files with missing lines Patch % Lines
src/xrpld/app/wasm/detail/WamrVM.cpp 78.1% 84 Missing ⚠️
src/xrpld/app/wasm/detail/HostFuncWrapper.cpp 93.5% 56 Missing ⚠️
src/xrpld/app/wasm/HostFuncImpl.h 82.6% 4 Missing ⚠️
src/xrpld/app/wasm/detail/HostFuncImpl.cpp 99.7% 2 Missing ⚠️
src/xrpld/app/wasm/detail/WasmVM.cpp 98.0% 2 Missing ⚠️
src/libxrpl/basics/Number.cpp 95.2% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##           ripple/wamr   #5791     +/-   ##
=============================================
+ Coverage         78.9%   79.3%   +0.4%     
=============================================
  Files              816     825      +9     
  Lines            72073   74169   +2096     
  Branches          8412    8497     +85     
=============================================
+ Hits             56867   58820   +1953     
- Misses           15206   15349    +143     
Files with missing lines Coverage Δ
include/xrpl/basics/Number.h 100.0% <ø> (ø)
include/xrpl/protocol/IOUAmount.h 100.0% <ø> (ø)
include/xrpl/protocol/TER.h 100.0% <ø> (ø)
src/libxrpl/protocol/IOUAmount.cpp 91.7% <100.0%> (+0.1%) ⬆️
src/libxrpl/protocol/TER.cpp 100.0% <ø> (ø)
src/xrpld/app/wasm/HostFunc.h 100.0% <100.0%> (ø)
src/xrpld/app/wasm/ParamsHelper.h 100.0% <100.0%> (ø)
src/xrpld/app/wasm/WamrVM.h 100.0% <100.0%> (ø)
src/xrpld/app/wasm/WasmVM.h 100.0% <100.0%> (ø)
src/libxrpl/basics/Number.cpp 99.3% <95.2%> (-0.2%) ⬇️
... and 5 more

... and 5 files with indirect coverage changes

Impacted file tree graph

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

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