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

chore: upgrade ic-wasm/walrus to build memory64 #3827

Merged
merged 2 commits into from
Jul 10, 2024
Merged

Conversation

lwshang
Copy link
Contributor

@lwshang lwshang commented Jul 10, 2024

Description

Upgraded dependencies: ic-wasm and walrus to enable dfx post-processing memory64 canister Wasm module (shrink, optimize, etc) during a later stage of canister building.

Because of indirect dependencies (wasm-tools crates, e.g. wasmparser), the MSRV has to be raised to 1.76.0.

How Has This Been Tested?

Added an test case in e2e build.bash. It only checks that dfx build works with memory64 canister.

Without upgrading the dependencies, the test case result in following error:

   Error: Failed while trying to build all canisters.
   Caused by: The post-build step failed for canister 'ysjhp-aflwe-vzqkl-xkqea' (m64)
   Caused by: Failed to post-process wasm of canister 'm64'.
   Caused by: Failed to parse wasm module from "/private/var/folders/gj/4gp_5xvj7gs1yp4mzxw2mjx80000gn/T/dfx-e2e-XXXXXXXX.lOADiDDpXc/working-dir/e2e_project/m64.wasm"
   Caused by: Failed to parse bytes as wasm
   Caused by: Could not parse the data as WASM module. failed to parse memory section

Notice

This is not a complete support of memory64 canister. We will make it in future PRs which:

  • Update IC replica which enables the 64-bit system API
  • Create canisters which invokes 64-bit system API
  • Verify such canisters can be deployed to the updated replica and functions as expected.

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@lwshang lwshang marked this pull request as ready for review July 10, 2024 16:05
@lwshang lwshang requested a review from a team as a code owner July 10, 2024 16:05
@lwshang lwshang enabled auto-merge (squash) July 10, 2024 16:20
@lwshang lwshang merged commit b5e4391 into master Jul 10, 2024
295 of 296 checks passed
@lwshang lwshang deleted the lwshang/build_memory64 branch July 10, 2024 16:32
rikonor pushed a commit that referenced this pull request Feb 3, 2025
* chore: upgrade ic-wasm and walrus to support wasm64

* e2e test
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