The Wire · Showcase
BROWSER WASM BLOAT FIXED, RELOCATION SHRINKING SHIPS
By RepoJournal · Filed · About .NET
dotnet/runtime eliminated unnecessary cryptography dependencies from browser builds while implementing code section relocation optimizations that shrink Wasm binaries.
The headline fix addresses a regression where ZipArchive was rooting System.Security.Cryptography in browser-wasm builds even though WinZip AES is unsupported there [1]. The team excluded WinZip AES files and cryptography references from browser builds while providing stubs that throw PlatformNotSupportedException, keeping ZipCrypto intact for other platforms. Simultaneously, a relocation shrinking optimization in WasmObjectWriter [2] stops padding all code relocations to maximum 32-bit ULEB length of 5 bytes, instead re-writing each to minimal length and updating code blob LEB lengths accordingly. Related cleanup includes removing redundant PEAssembly constructor parameters [3] that were only used in one case and deleting unused OpenSSL interop methods [4]. The dotnet/dotnet aggregate continues pulling source updates from runtime, msbuild, efcore, nuget.client, and vstest [5] [6] [7], while dotnet/performance syncs dependencies from dotnet/dotnet, maui, android, and xharness [8] [9] [10] [11]. All systems flowing codeflow updates across the platform.
One email a day. Unsubscribe in one click.
Keep up with .NET in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Review browser wasm application sizes after the cryptography exclusion dotnet/runtime [plan]
- → Monitor relocation shrinking impact on code section sizes in your Wasm builds dotnet/runtime [monitor]
- → Sync dotnet/dotnet codeflow updates into your build pipeline dotnet/dotnet [plan]
References
- [1] Avoid rooting cryptography through ZipArchive on browser ↗ dotnet/runtime
- [2] [crossgen2][wasm] Shrink Code Section Relocs ↗ dotnet/runtime
- [3] Remove and clarify `PEAssembly` constructor parameters ↗ dotnet/runtime
- [4] Remove unused OpenSSL Interop ↗ dotnet/runtime
- [5] [main] Source code updates from dotnet/runtime ↗ dotnet/dotnet
- [6] [main] Source code updates from dotnet/msbuild ↗ dotnet/dotnet
- [7] [main] Source code updates from dotnet/efcore ↗ dotnet/dotnet
- [8] [main] Update dependencies from dotnet/dotnet ↗ dotnet/performance
- [9] [main] Update dependencies from dotnet/maui ↗ dotnet/performance
- [10] [main] Update dependencies from dotnet/android ↗ dotnet/performance
- [11] [main] Update dependencies from dotnet/xharness ↗ dotnet/performance