cli icon indicating copy to clipboard operation
cli copied to clipboard

Add trampoline run on wasm modules as part of function build

Open saga-dasgupta opened this issue 7 months ago β€’ 2 comments

@lopert had most of the work done, I added some tests, cleanup and fixed the download package path.

WHY are these changes introduced?

Fixes https://github.com/shop/issues-shopifyvm/issues/28

We need to apply the trampolining process to guest modules using the Wasm API to allow for it to copy data between the memory of the provider and guest modules.

WHAT is this pull request doing?

Downloading the trampoline release from github and run trampoline with input as function.wasm file during function build.

How to test your changes?

pnpm run shopify app function build --path <full path to your functions app> --verbose verbose let me see that all the download and apply trampoline commands succeeded.

Post-release steps

Measuring impact

How do we know this change was effective? Please choose one:

  • [ ] n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • [ ] Existing analytics will cater for this addition
  • [ ] PR includes analytics changes to measure impact

Checklist

  • [x] I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • [x] I've considered possible documentation changes

saga-dasgupta avatar May 07 '25 18:05 saga-dasgupta

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
76.77% (+0.03% πŸ”Ό)
9667/12592
🟑 Branches
72.12% (+0.04% πŸ”Ό)
4785/6635
🟑 Functions
76.6% (+0.01% πŸ”Ό)
2495/3257
🟑 Lines
77.28% (+0.03% πŸ”Ό)
9138/11824

Test suite run success

2289 tests passing in 990 suites.

Report generated by πŸ§ͺjest coverage report action from 488c549519acb8dbfca60492ae8dd6bdce0c1e7f

github-actions[bot] avatar May 07 '25 19:05 github-actions[bot]

We detected some changes at packages/*/src and there are no updates in the .changeset. If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

[!CAUTION] DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

github-actions[bot] avatar May 07 '25 19:05 github-actions[bot]

Re-requesting reviews because I added a minor version changeset.

saga-dasgupta avatar May 12 '25 16:05 saga-dasgupta