Skip to content

Type 64-bit WebAssembly memories and tables with bigint addresses - #2607

Open
Martin Ferret (MartinFerret) wants to merge 1 commit into
microsoft:mainfrom
MartinFerret:fix-2485-wasm64-address-types
Open

Martin Ferret (MartinFerret) wants to merge 1 commit into
microsoft:mainfrom
MartinFerret:fix-2485-wasm64-address-types

Conversation

@MartinFerret

Copy link
Copy Markdown
Contributor

Fixes #2485

64-bit memories and tables (address: "i64") use bigints at runtime, but the types only accepted numbers, so valid code didn't compile.

As agreed in the issue, numbers stay the default and bigints are only used when the descriptor says address: "i64", the same way #2592 handles shared. Memory, Table and their descriptors get an address type parameter that defaults to "i32", so existing code keeps compiling.

What can change for users:

A new unit test covers the 64-bit cases and fails without the patch. The #2592 test passes unchanged, npm test passes, and the older outputs compile on TypeScript 5.5.4, 5.6.3 and 5.9.3.

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.

[Web API type definition issue] Wasm64 Support

1 participant