Get the latest tech news
c4wa – C compiler for Web Assembly
A simplified subset of C transpiled into Web Assembly - kign/c4wa
It creates minimalistic well-optimized Web Assembly output without any "glue" to make it work with your application, without any embedded libraries, or any other overhead. If you can read Web Assembly instructions, you can see how this corresponds to the original C code, and it would seem reasonably close to how one might solve this problem directly in WAT. To try it, simply run./init.bash from that directory (it'll check prerequisites, install required npm modules, compile the source and load in browser); To cleanup, use./init.bash clean.
Or read this on Hacker News