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

Support for memory64 #284

Merged
merged 6 commits into from
Oct 25, 2023
Merged

Support for memory64 #284

merged 6 commits into from
Oct 25, 2023

Conversation

ureeves
Copy link
Member

@ureeves ureeves commented Oct 24, 2023

This PR leverages the new Dusk compiler and the forked wasmtime crate to support memory64 and increase the maximum size of the data managed by a contract to 4TiB.

Resolves #159 #280 #281

@ureeves ureeves force-pushed the memory64 branch 2 times, most recently from ba9b99d to 05d51cc Compare October 24, 2023 12:56
@ureeves ureeves force-pushed the memory64 branch 2 times, most recently from a022c46 to c7bcfbd Compare October 24, 2023 14:43
Eduardo Leegwater Simões added 2 commits October 24, 2023 16:48
Support for the WebAssembly `memory64` proposal is done by properly
configuring wasmtime, and adapting the validation of the contracts
accordingly. Imports also have to be adapted - in the sense that
versions that take pointers as arguments have to now take 64-bit
pointers, as opposed to 32-bit.

Resolves #281
@ureeves ureeves marked this pull request as ready for review October 24, 2023 14:48
Copy link
Member

@HDauven HDauven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Very happy these issues are resolved.
One thing I'd like to be added is a little documentation on that Piecrust can handle both wasm32 and wasm64 contracts.

Copy link
Member

@moCello moCello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question about the essentially doubled modules imports::wasm32 and imports::wasm64 but for the rest very nice!

piecrust/src/imports/wasm32.rs Show resolved Hide resolved
piecrust/src/imports/wasm32.rs Show resolved Hide resolved
piecrust/src/imports/wasm32.rs Show resolved Hide resolved
piecrust/src/imports/wasm32.rs Show resolved Hide resolved
piecrust/src/instance.rs Show resolved Hide resolved
piecrust/src/store/memory.rs Show resolved Hide resolved
@ureeves
Copy link
Member Author

ureeves commented Oct 25, 2023

LGTM!

Very happy these issues are resolved. One thing I'd like to be added is a little documentation on that Piecrust can handle both wasm32 and wasm64 contracts.

I added some docs to the crate docs and the Session::deploy function docs.

@ureeves ureeves merged commit 13dc56f into main Oct 25, 2023
4 checks passed
@ureeves ureeves deleted the memory64 branch October 25, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants