Currently wasm's size_t is unsigned int for compatibility with asm.js and Emscripten's library code; see the patch for details.
Changing it to unsigned long (which is also 32-bit on wasm32) would make it the same type as wasm64 (where unsigned long is 64-bit), which would eliminate the most common cause for mangled names being different between wasm32 and wasm64. For example, export lists containing symbol names could often be the same between wasm32 and wasm64.
Even though the ABI won't be officially stable for a while, increasing numbers of tools are looking to interoperate with LLVM's output, and core details like the size_t type may become inconvenient to change in the future.
This patch aims to remain compatible with current Emscripten integration by making the change only in the wasm32-unknown-unknown-wasm triple, so it won't affect the s2wasm path, which uses the wasm32-unknown-unknown-elf triple. It would be something that would need to be handled if Emscripten wants to start using the wasm32-unknown-unknown-wasm triple through.