Use encoding_rs for text encoding
refactor(web): use encoding_rs for text encoding (#10844)
Use encoding_rs for text encodingrefactoruse encoding text web
Committed by lucacasonato
commit message
refactor(web): use encoding_rs for text encoding (#10844)
This commit removes all JS based text encoding / text decoding. Instead
encoding now happens in Rust via encoding_rs (already in tree). This
implementation retains stream support, but adds the last missing
encodings. We are incredibly close to 100% WPT on text encoding now.
This should reduce our baseline heap by quite a bit.Editor assessment
The subject states the architectural swap exactly: encoding_rs replaces the text encoding layer. The body teaches on three axes: JS encoding is removed entirely, stream support is retained while the last missing encodings are added, Web Platform Test coverage is nearly complete, and baseline heap should shrink. That is correctness, compatibility, and performance in five lines. Type refactor and scope web are accurate, and hygiene is clean. An exemplary, genuinely instructive message.