Skip to content

Fix fuel accounting in tests on MacOS - #1243

Merged
jeffcharles merged 1 commit into
mainfrom
jc.fix-tests-on-macos
Jul 29, 2026
Merged

Fix fuel accounting in tests on MacOS#1243
jeffcharles merged 1 commit into
mainfrom
jc.fix-tests-on-macos

Conversation

@jeffcharles

@jeffcharles jeffcharles commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Description of the change

There shouldn't be any functional changes. This just adjusts how we initialize modules in tests so we consistently use a file-backed initialization image that skips copying active data segments into linear memory.

Why am I making this change?

The tests stopped passing on MacOS due to fuel consumed becoming much higher after we updated to Wasmtime 46. Wasmtime 46, in this change, started executing startup code in Wasm instead of in the host environment. On Linux, this doesn't really make a difference to fuel accounting in practice. On MacOS however, the startup function performs operations to copy memory. I've put a comment in the code change explaining the details.

Checklist

  • I've updated the default plugin import namespace and incremented the major version of javy-plugin-api if the QuickJS bytecode has changed.
  • I've updated the relevant CHANGELOG files if necessary. Changes to javy-cli, javy-plugin, and javy-plugin-processing do not require updating CHANGELOG files.
  • I've updated the relevant crate versions if necessary. Versioning policy for library crates
  • I've updated documentation including crate documentation if necessary.

@jeffcharles
jeffcharles marked this pull request as ready for review July 28, 2026 17:31
@jeffcharles
jeffcharles requested a review from saulecabrera July 28, 2026 17:31
@jeffcharles
jeffcharles merged commit 5e120a3 into main Jul 29, 2026
4 checks passed
@jeffcharles
jeffcharles deleted the jc.fix-tests-on-macos branch July 29, 2026 20:51
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