Originally shared by Ramin Honary
John Hardy Turnbull delenda est’s prediction about a bunch of “shitty” compilers targeting WebAssembly is already turning out to be correct. Here is a project (although I feel bad calling them “shitty,” they’re working hard on it) trying to port musl libc to WebAssembly, with the goal of then using Clang to compile LLVM bytecode to WebAssembly statically linking musl libc to power the Haskell Runtime System (RTS). Since GHC Haskell alreaedy targets LLVM, this would mean any Haskell program will run in the browser, complete with optimizations. Whether the WebAssembly+musl libc emitted by Clang will be well optimized to run on a browser is another question entirely, but almost certainly the answer is “no,” it won’t be well optimized, hence “shitty,” though not bad at all for an experimental project.


