From c6231352ababcbeb52b088f72bb13aebe51c3764 Mon Sep 17 00:00:00 2001 From: daxpedda Date: Mon, 25 May 2026 20:07:59 +0200 Subject: [PATCH] Do not support JS strings beyond 2^32 bytes --- proposals/js-text-encoding-builtins/Overview.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/proposals/js-text-encoding-builtins/Overview.md b/proposals/js-text-encoding-builtins/Overview.md index bd805b631f..224db3a5ef 100644 --- a/proposals/js-text-encoding-builtins/Overview.md +++ b/proposals/js-text-encoding-builtins/Overview.md @@ -168,7 +168,7 @@ func encodeStringIntoUTF8Memory( string: externref, start: i64, end: i64 -) -> (i64, i64) +) -> (i32, i64) { start >>>= 0; end >>>= 0; @@ -217,3 +217,7 @@ There is an [ongoing discussion](https://github.com/WebAssembly/esm-integration/ ### Why do the provided functions take `i64` instead of `i32`? This enables support for the Memory64 proposal. + +### What about JS strings larger than 2^32 bytes? + +Given that currently no engine supports strings larger than 2^30 and there are currently no plans to do so, we concluded to postpone specifically addressing this. See [#3](https://github.com/WebAssembly/js-text-encoding-builtins/issues/3).